omniauth-infinum_id 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +28 -28
- data/README.md +37 -3
- data/lib/omniauth/infinum_id/version.rb +1 -1
- data/lib/omniauth/strategies/infinum_id.rb +2 -1
- data/omniauth-infinum_id.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: af0e0754168c4a545fd2c8fe585f1e6aa7ac5e47
|
4
|
+
data.tar.gz: ab886d589021da83912cd684f0d0b10da9f98226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f3f8e96a4c3c364a7463d6bf0ee7501b18405562332a2eb48dec84f06be3e7c878df1fc1d6f6b22dbac542015bb96c4a42acdd3fe856274e6bc6e6e0137fd84
|
7
|
+
data.tar.gz: 19172c5afce3b47abc4b955b0e66946afee90669175be169661adfebb5a773f4cf0a02ab0dbcb547902da6ad081867285fe6be42eef547904edb43b177f99035
|
data/Gemfile.lock
CHANGED
@@ -1,56 +1,56 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-infinum_id (1.1
|
4
|
+
omniauth-infinum_id (1.2.1)
|
5
5
|
omniauth-oauth2
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
diff-lcs (1.
|
11
|
-
faraday (0.
|
10
|
+
diff-lcs (1.4.4)
|
11
|
+
faraday (1.0.1)
|
12
12
|
multipart-post (>= 1.2, < 3)
|
13
|
-
hashie (
|
14
|
-
jwt (2.2.
|
15
|
-
multi_json (1.
|
13
|
+
hashie (4.1.0)
|
14
|
+
jwt (2.2.2)
|
15
|
+
multi_json (1.15.0)
|
16
16
|
multi_xml (0.6.0)
|
17
17
|
multipart-post (2.1.1)
|
18
|
-
oauth2 (1.4.
|
19
|
-
faraday (>= 0.8, <
|
18
|
+
oauth2 (1.4.4)
|
19
|
+
faraday (>= 0.8, < 2.0)
|
20
20
|
jwt (>= 1.0, < 3.0)
|
21
21
|
multi_json (~> 1.3)
|
22
22
|
multi_xml (~> 0.5)
|
23
23
|
rack (>= 1.2, < 3)
|
24
|
-
omniauth (1.9.
|
25
|
-
hashie (>= 3.4.6
|
24
|
+
omniauth (1.9.1)
|
25
|
+
hashie (>= 3.4.6)
|
26
26
|
rack (>= 1.6.2, < 3)
|
27
|
-
omniauth-oauth2 (1.
|
28
|
-
oauth2 (~> 1.
|
27
|
+
omniauth-oauth2 (1.7.0)
|
28
|
+
oauth2 (~> 1.4)
|
29
29
|
omniauth (~> 1.9)
|
30
|
-
rack (2.
|
31
|
-
rake (
|
32
|
-
rspec (3.
|
33
|
-
rspec-core (~> 3.
|
34
|
-
rspec-expectations (~> 3.
|
35
|
-
rspec-mocks (~> 3.
|
36
|
-
rspec-core (3.
|
37
|
-
rspec-support (~> 3.
|
38
|
-
rspec-expectations (3.
|
30
|
+
rack (2.2.3)
|
31
|
+
rake (13.0.1)
|
32
|
+
rspec (3.9.0)
|
33
|
+
rspec-core (~> 3.9.0)
|
34
|
+
rspec-expectations (~> 3.9.0)
|
35
|
+
rspec-mocks (~> 3.9.0)
|
36
|
+
rspec-core (3.9.2)
|
37
|
+
rspec-support (~> 3.9.3)
|
38
|
+
rspec-expectations (3.9.2)
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
40
|
+
rspec-support (~> 3.9.0)
|
41
|
+
rspec-mocks (3.9.1)
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
43
|
+
rspec-support (~> 3.9.0)
|
44
|
+
rspec-support (3.9.3)
|
45
45
|
|
46
46
|
PLATFORMS
|
47
47
|
ruby
|
48
48
|
|
49
49
|
DEPENDENCIES
|
50
|
-
bundler (~> 1
|
50
|
+
bundler (~> 2.1)
|
51
51
|
omniauth-infinum_id!
|
52
|
-
rake (~>
|
52
|
+
rake (~> 13.0)
|
53
53
|
rspec (~> 3.0)
|
54
54
|
|
55
55
|
BUNDLED WITH
|
56
|
-
1.
|
56
|
+
2.1.4
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Omniauth::InfinumId
|
2
2
|
|
3
|
-
|
3
|
+
Strategy to authenticate with [InfinumID](https://github.com/infinum/rails-infinum-id) via OAuth2 in OmniAuth.
|
4
4
|
|
5
|
-
|
5
|
+
This gem is being used inside [infinum_id-engine](https://github.com/infinum/rails-infinum-id-engine).
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,41 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Name of the strategy is `infinum_id`.
|
26
|
+
|
27
|
+
Initialize omniauth inside devise:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# config/initializers/devise.rb
|
31
|
+
|
32
|
+
config.omniauth(
|
33
|
+
:infinum_id,
|
34
|
+
'InfinumID_client_id',
|
35
|
+
'InfinumID_client_secret',
|
36
|
+
client_options: { site: 'InfinumID_url' }
|
37
|
+
)
|
38
|
+
```
|
39
|
+
|
40
|
+
When user is authenticated via omniauth, strategy will parse users info into following:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
{
|
44
|
+
"provider" => "infinum_id",
|
45
|
+
"uid" => 17, # ID_OF_USER_ON_INFINUM_ID_SERVER
|
46
|
+
"info" =>
|
47
|
+
{
|
48
|
+
"email" => 'mirko.mirkec@infinum.hr',
|
49
|
+
"first_name" => 'Mirko',
|
50
|
+
"last_name" => 'Mirkec',
|
51
|
+
"slack_username" => 'mmirkec',
|
52
|
+
"time_zone" => 'Zagreb', # Name of time zone
|
53
|
+
"deactivated_at" => nil, # DateTime when user was deactivated or nil if it's not
|
54
|
+
"avatar_url" => nil # Remote url to user profile picture
|
55
|
+
}
|
56
|
+
}
|
57
|
+
```
|
58
|
+
|
59
|
+
Lastly, callback method should be created with same name as strategy, in this case `infinum_id`, inside `OmniauthCallbackController`. In this method user should be authenticated and signed in.
|
26
60
|
|
27
61
|
## Development
|
28
62
|
|
@@ -17,7 +17,8 @@ module OmniAuth
|
|
17
17
|
slack_username: raw_info['slack_username'],
|
18
18
|
time_zone: raw_info['time_zone'],
|
19
19
|
deactivated_at: raw_info['deactivated_at'],
|
20
|
-
avatar_url: raw_info['avatar_url']
|
20
|
+
avatar_url: raw_info['avatar_url'],
|
21
|
+
employee: raw_info['employee']
|
21
22
|
}
|
22
23
|
end
|
23
24
|
|
data/omniauth-infinum_id.gemspec
CHANGED
@@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ['lib']
|
33
33
|
|
34
|
-
spec.add_development_dependency 'bundler', '~> 1
|
35
|
-
spec.add_development_dependency 'rake', '~>
|
34
|
+
spec.add_development_dependency 'bundler', '~> 2.1'
|
35
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
36
36
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
37
37
|
|
38
38
|
spec.add_dependency 'omniauth-oauth2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-infinum_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dajana Jeroncic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
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: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
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: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.6.11
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Write a short summary, because RubyGems requires one.
|