omniauth-josso 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/josso/version.rb +1 -1
- data/lib/omniauth/strategies/josso.rb +13 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45d0913ab0f9ce4b8a853231ad740f623a3de596
|
4
|
+
data.tar.gz: dbb8988fc83f404fb2cb4b2798f1aae4928b1436
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b37ca930b60b5a2da7c21404dc7aaddbb66e8ad72f2eeece22afdcd18773154e88a3bd4a27b1a88238fb9b49512f12541ae306499204ea903931549f867f75d
|
7
|
+
data.tar.gz: 46741c1e2fef512e76fa216d269a2dbd22f321d5bee007848f6169d2112d29934805cdf5a5bf7c03198fe719ac80f9009bed98201ecb7742cb23372b19f01f10
|
@@ -28,6 +28,12 @@ module OmniAuth
|
|
28
28
|
}
|
29
29
|
end
|
30
30
|
|
31
|
+
extra do
|
32
|
+
{
|
33
|
+
roles: agent.roles
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
31
37
|
def agent
|
32
38
|
@agent ||= Agent.new options.endpoint_url, request.params['josso_assertion_id']
|
33
39
|
end
|
@@ -59,6 +65,13 @@ module OmniAuth
|
|
59
65
|
res.to_hash[:multi_ref]
|
60
66
|
end
|
61
67
|
end
|
68
|
+
|
69
|
+
def roles
|
70
|
+
@roles ||= begin
|
71
|
+
res = identity_manager.call :find_roles_by_username, message: { 'in0' => user.first[:name] }
|
72
|
+
res.to_hash[:multi_ref].map { |h| h[:name] }
|
73
|
+
end
|
74
|
+
end
|
62
75
|
end
|
63
76
|
end
|
64
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-josso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patricio Mac Adden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.6.
|
106
|
+
rubygems_version: 2.6.11
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: A Josso strategy for OmniAuth
|