omniauth-alephx 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODYwZTc0Mzk4YTQwYThlMmU1MjM3ZjU1ODlhMTQxYjViMjA3OGQ0ZQ==
5
- data.tar.gz: !binary |-
6
- NzMzMTA0YTYxMjQ4ZjZmNWI3M2M1N2UxZDRmNDEzYjIyZjhkYWFmMA==
2
+ SHA1:
3
+ metadata.gz: 99dce94d296aa5edf72468446c6fb60804802973
4
+ data.tar.gz: 9b8c2bde0041eb34fb0a9fb5235636af3a089411
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YmVjNzI0ZWU4YThlMjc0MTdhOTQxNDZmYjZlMTA3OGMwZDVmYThmOWM3Yjk1
10
- MmVhNzY2MzE5Zjg2MWMwYmI3NGU0MzNjZmQ2YTFhNDMyMjE4YjU5NGQ2Zjk4
11
- NjdiODBlMjYyZmQyNWZkYTZkYTJjYzc5NGJhMTY4MDJmOWU4ODE=
12
- data.tar.gz: !binary |-
13
- YWEwMWIzZjcxMWZiNTc0NGE2YzgzYjlkMzJlMGQ0NTU3ZTRjNTdlYjkwNDJj
14
- OTIzMDM2YTcxMTE5YjQ3ZDU5MzY0M2Q3YjU3ZDg3OThiNDU2MzRmNWUyM2Vi
15
- ODE5Mzc1YTlmZTRjYTdmNmIzODUyMDQwZTFkYjc0ZTg5NTIyNGE=
6
+ metadata.gz: c5ef290341a1e27fecfafc94928c31e887ed4fde578383f39d5607827f68a16fd386b2ac32a73bfd2536c2855e1aac6d353bf640aa9418bcfc83cf788a0e79d0
7
+ data.tar.gz: ccfbc5c060d96727d1fbe02a0e8d8268fcf80949dac08fee5715d414a3f66bfc8303674d47ddfce9e1f3c45e0c61ffb3d685a4f2d2c04699c7e24c137f861ee7
data/Gemfile CHANGED
@@ -1,16 +1,4 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "shoulda", ">= 0"
10
- gem "rdoc", "~> 3.12"
11
- gem "bundler", "~> 1.0"
12
- gem "jeweler", "~> 2.0.1"
13
- gem "simplecov", ">= 0"
14
- end
15
- gem 'omniauth'
16
- gem 'xml-simple'
3
+ gem 'omniauth','1.3.2'
4
+ gem 'xml-simple','1.1.5'
@@ -1,87 +1,19 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (4.0.3)
5
- i18n (~> 0.6, >= 0.6.4)
6
- minitest (~> 4.2)
7
- multi_json (~> 1.3)
8
- thread_safe (~> 0.1)
9
- tzinfo (~> 0.3.37)
10
- addressable (2.3.5)
11
- atomic (1.1.15)
12
- builder (3.2.2)
13
- descendants_tracker (0.0.3)
14
- docile (1.1.3)
15
- faraday (0.9.0)
16
- multipart-post (>= 1.2, < 3)
17
- git (1.2.6)
18
- github_api (0.11.3)
19
- addressable (~> 2.3)
20
- descendants_tracker (~> 0.0.1)
21
- faraday (~> 0.8, < 0.10)
22
- hashie (>= 1.2)
23
- multi_json (>= 1.7.5, < 2.0)
24
- nokogiri (~> 1.6.0)
25
- oauth2
26
- hashie (2.0.5)
27
- highline (1.6.20)
28
- i18n (0.6.9)
29
- jeweler (2.0.1)
30
- builder
31
- bundler (>= 1.0)
32
- git (>= 1.2.5)
33
- github_api
34
- highline (>= 1.6.15)
35
- nokogiri (>= 1.5.10)
36
- rake
37
- rdoc
38
- json (1.8.1)
39
- jwt (0.1.11)
40
- multi_json (>= 1.5)
41
- mini_portile (0.5.2)
42
- minitest (4.7.5)
43
- multi_json (1.8.4)
44
- multi_xml (0.5.5)
45
- multipart-post (2.0.0)
46
- nokogiri (1.6.1)
47
- mini_portile (~> 0.5.0)
48
- oauth2 (0.9.3)
49
- faraday (>= 0.8, < 0.10)
50
- jwt (~> 0.1.8)
51
- multi_json (~> 1.3)
52
- multi_xml (~> 0.5)
53
- rack (~> 1.2)
54
- omniauth (1.2.1)
55
- hashie (>= 1.2, < 3)
56
- rack (~> 1.0)
57
- rack (1.5.2)
58
- rake (10.1.1)
59
- rdoc (3.12.2)
60
- json (~> 1.4)
61
- shoulda (3.5.0)
62
- shoulda-context (~> 1.0, >= 1.0.1)
63
- shoulda-matchers (>= 1.4.1, < 3.0)
64
- shoulda-context (1.1.6)
65
- shoulda-matchers (2.5.0)
66
- activesupport (>= 3.0.0)
67
- simplecov (0.8.2)
68
- docile (~> 1.1.0)
69
- multi_json
70
- simplecov-html (~> 0.8.0)
71
- simplecov-html (0.8.0)
72
- thread_safe (0.2.0)
73
- atomic (>= 1.1.7, < 2)
74
- tzinfo (0.3.38)
75
- xml-simple (1.1.3)
4
+ hashie (3.6.0)
5
+ omniauth (1.3.2)
6
+ hashie (>= 1.2, < 4)
7
+ rack (>= 1.0, < 3)
8
+ rack (2.0.6)
9
+ xml-simple (1.1.5)
76
10
 
77
11
  PLATFORMS
78
12
  ruby
79
13
 
80
14
  DEPENDENCIES
81
- bundler (~> 1.0)
82
- jeweler (~> 2.0.1)
83
- omniauth
84
- rdoc (~> 3.12)
85
- shoulda
86
- simplecov
87
- xml-simple
15
+ omniauth (= 1.3.2)
16
+ xml-simple (= 1.1.5)
17
+
18
+ BUNDLED WITH
19
+ 2.0.1
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Alephx
3
- VERSION = "0.1.31"
3
+ VERSION = "0.1.32"
4
4
  end
5
5
  end
@@ -11,51 +11,52 @@ module OmniAuth
11
11
  option :url # :url => "http://aleph.ugent.be/X"
12
12
  option :library # :library => "rug50"
13
13
 
14
- #only for test purpose (if you do not specify the option :form, a form will be created, using these options)
14
+ #only for test purpose (if you do not specify the option :form, a form
15
+ #will be created, using these options)
15
16
  option :title_form, "Aleph authentication"
16
17
  option :label_password,:password
17
18
  option :label_username,:username
18
19
  option :label_submit, "submit"
19
20
 
20
- @user_info = {}
21
-
22
21
  class << self
23
- attr_accessor :filters,:on_error
22
+ attr_accessor :filters, :on_error
24
23
 
25
24
  def add_filter(&block)
26
- @filters = [] if @filters.nil?
25
+ @filters ||= []
27
26
  @filters << block
28
27
  end
29
28
  end
30
29
 
31
30
  uid {
32
- @user_info[:bor_id]
31
+ user_info[:bor_id]
33
32
  }
34
33
  info {
35
- {
36
- :name => @user_info[:name],
37
- :email => @user_info[:email]
38
- }
34
+ i = {}
35
+ [:name, :email].each do |key|
36
+ i[key] = user_info[key] if user_info[key].is_a? String
37
+ end
38
+ i
39
39
  }
40
40
  credentials {
41
41
  {}
42
42
  }
43
43
  extra {
44
- @user_info
44
+ {}
45
45
  }
46
46
 
47
- def request_phase
47
+ def user_info
48
+ @user_info ||= {}
49
+ end
48
50
 
51
+ def request_phase
49
52
  form = OmniAuth::Form.new(:title => options[:title_form], :url => callback_path)
50
53
  form.text_field options[:label_username],:username
51
54
  form.password_field options[:label_password],:password
52
55
  form.button options[:label_submit]
53
56
  form.to_response
54
-
55
57
  end
56
58
 
57
59
  def callback_phase
58
-
59
60
  params = request.params
60
61
 
61
62
  rp = script_name + request_path+"?"+{ :username => params['username'] }.to_query
@@ -68,7 +69,6 @@ module OmniAuth
68
69
 
69
70
  begin
70
71
 
71
-
72
72
  unless self.class.filters.nil?
73
73
  self.class.filters.each do |filter|
74
74
  filter.call(params)
@@ -96,7 +96,6 @@ module OmniAuth
96
96
  end
97
97
 
98
98
  def bor_auth(username,password)
99
-
100
99
  uri = URI.parse(options[:url]+"?"+{
101
100
  :op => "bor-auth",
102
101
  :bor_id => username,
@@ -115,15 +114,17 @@ module OmniAuth
115
114
  return false if document['error']
116
115
 
117
116
  @user_info = {
118
- #user pwd to communicate with aleph (cannot extract cas username or barcode from alephx!)
117
+ # user pwd to communicate with aleph (cannot extract cas username or
118
+ # barcode from alephx!)
119
119
  :bor_id => document['z303']['z303-id'],
120
120
  :name => document['z303']['z303-name'],
121
- :email => document['z304']['z304-email-address']
121
+ :email => document['z304']['z304-email-address'],
122
+ :doc => document
122
123
  }
123
124
 
124
125
  return true
125
-
126
126
  end
127
+
127
128
  def missing_credentials?
128
129
  request['username'].nil? or request['username'].empty? or request['password'].nil? or request['password'].empty?
129
130
  end
@@ -1,17 +1,9 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: omniauth-alephx 0.1.31 ruby lib
6
-
7
1
  Gem::Specification.new do |s|
8
2
  s.name = "omniauth-alephx"
9
- s.version = "0.1.31"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
3
+ s.version = "0.1.32"
12
4
  s.require_paths = ["lib"]
13
5
  s.authors = ["Nicolas Franck"]
14
- s.date = "2015-10-05"
6
+ s.date = "2019-02-19"
15
7
  s.description = "omniauth strategy for authenticating against AlephX Service"
16
8
  s.email = "nicolas.franck@ugent.be"
17
9
  s.extra_rdoc_files = [
@@ -19,7 +11,6 @@ Gem::Specification.new do |s|
19
11
  "README.md"
20
12
  ]
21
13
  s.files = [
22
- ".document",
23
14
  "Gemfile",
24
15
  "Gemfile.lock",
25
16
  "LICENSE.txt",
@@ -29,42 +20,12 @@ Gem::Specification.new do |s|
29
20
  "lib/omniauth-alephx.rb",
30
21
  "lib/omniauth-alephx/version.rb",
31
22
  "lib/omniauth/strategies/alephx.rb",
32
- "omniauth-alephx.gemspec",
33
- "test/helper.rb"
23
+ "omniauth-alephx.gemspec"
34
24
  ]
35
25
  s.homepage = "http://github.com/nicolasfranck/omniauth-alephx"
36
26
  s.licenses = ["MIT"]
37
- s.rubygems_version = "2.4.5"
38
27
  s.summary = "omniauth strategy for authenticating against AlephX Service"
39
-
40
- if s.respond_to? :specification_version then
41
- s.specification_version = 4
42
-
43
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
- s.add_runtime_dependency(%q<omniauth>, [">= 0"])
45
- s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
46
- s.add_development_dependency(%q<shoulda>, [">= 0"])
47
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
48
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
49
- s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
50
- s.add_development_dependency(%q<simplecov>, [">= 0"])
51
- else
52
- s.add_dependency(%q<omniauth>, [">= 0"])
53
- s.add_dependency(%q<xml-simple>, [">= 0"])
54
- s.add_dependency(%q<shoulda>, [">= 0"])
55
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
56
- s.add_dependency(%q<bundler>, ["~> 1.0"])
57
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
58
- s.add_dependency(%q<simplecov>, [">= 0"])
59
- end
60
- else
61
- s.add_dependency(%q<omniauth>, [">= 0"])
62
- s.add_dependency(%q<xml-simple>, [">= 0"])
63
- s.add_dependency(%q<shoulda>, [">= 0"])
64
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
65
- s.add_dependency(%q<bundler>, ["~> 1.0"])
66
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
67
- s.add_dependency(%q<simplecov>, [">= 0"])
68
- end
28
+ s.add_dependency('omniauth','1.3.2')
29
+ s.add_dependency('xml-simple','1.1.5')
69
30
  end
70
31
 
metadata CHANGED
@@ -1,113 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-alephx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.31
4
+ version: 0.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Franck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-05 00:00:00.000000000 Z
11
+ date: 2019-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.3.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: xml-simple
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.1.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: shoulda
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rdoc
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '3.12'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: '3.12'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- version: '1.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ~>
81
- - !ruby/object:Gem::Version
82
- version: '1.0'
83
- - !ruby/object:Gem::Dependency
84
- name: jeweler
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 2.0.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ~>
95
- - !ruby/object:Gem::Version
96
- version: 2.0.1
97
- - !ruby/object:Gem::Dependency
98
- name: simplecov
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ! '>='
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
40
+ version: 1.1.5
111
41
  description: omniauth strategy for authenticating against AlephX Service
112
42
  email: nicolas.franck@ugent.be
113
43
  executables: []
@@ -116,7 +46,6 @@ extra_rdoc_files:
116
46
  - LICENSE.txt
117
47
  - README.md
118
48
  files:
119
- - .document
120
49
  - Gemfile
121
50
  - Gemfile.lock
122
51
  - LICENSE.txt
@@ -127,7 +56,6 @@ files:
127
56
  - lib/omniauth-alephx/version.rb
128
57
  - lib/omniauth/strategies/alephx.rb
129
58
  - omniauth-alephx.gemspec
130
- - test/helper.rb
131
59
  homepage: http://github.com/nicolasfranck/omniauth-alephx
132
60
  licenses:
133
61
  - MIT
@@ -138,17 +66,17 @@ require_paths:
138
66
  - lib
139
67
  required_ruby_version: !ruby/object:Gem::Requirement
140
68
  requirements:
141
- - - ! '>='
69
+ - - ">="
142
70
  - !ruby/object:Gem::Version
143
71
  version: '0'
144
72
  required_rubygems_version: !ruby/object:Gem::Requirement
145
73
  requirements:
146
- - - ! '>='
74
+ - - ">="
147
75
  - !ruby/object:Gem::Version
148
76
  version: '0'
149
77
  requirements: []
150
78
  rubyforge_project:
151
- rubygems_version: 2.4.5
79
+ rubygems_version: 2.6.8
152
80
  signing_key:
153
81
  specification_version: 4
154
82
  summary: omniauth strategy for authenticating against AlephX Service
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
@@ -1,34 +0,0 @@
1
- require 'simplecov'
2
-
3
- module SimpleCov::Configuration
4
- def clean_filters
5
- @filters = []
6
- end
7
- end
8
-
9
- SimpleCov.configure do
10
- clean_filters
11
- load_adapter 'test_frameworks'
12
- end
13
-
14
- ENV["COVERAGE"] && SimpleCov.start do
15
- add_filter "/.rvm/"
16
- end
17
- require 'rubygems'
18
- require 'bundler'
19
- begin
20
- Bundler.setup(:default, :development)
21
- rescue Bundler::BundlerError => e
22
- $stderr.puts e.message
23
- $stderr.puts "Run `bundle install` to install missing gems"
24
- exit e.status_code
25
- end
26
- require 'test/unit'
27
- require 'shoulda'
28
-
29
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
30
- $LOAD_PATH.unshift(File.dirname(__FILE__))
31
- require 'omniauth-alephx'
32
-
33
- class Test::Unit::TestCase
34
- end