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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82c7d0942440a69a8d4ad69db617a3030988b9b2
4
- data.tar.gz: 1deabd8b1fb829c8899cd0947ee3681032dae9d8
3
+ metadata.gz: 45d0913ab0f9ce4b8a853231ad740f623a3de596
4
+ data.tar.gz: dbb8988fc83f404fb2cb4b2798f1aae4928b1436
5
5
  SHA512:
6
- metadata.gz: c8369df0dcc7e357066604c6144a881f6ba54f873249ee89f3f921c5271e1ef5c423c2f9d698203e9e64bcd2d2b7e8b705e87bc0cdb74a2691fc98ee35fdc5e6
7
- data.tar.gz: 948507e704c1b0a3e03dc4a00550cf1a9103b262f63701067609ae44122e6f719ea146a1eccf7884f0d10aec3be71a9168527bcf4a9d127de881dbf854e5a9fd
6
+ metadata.gz: 9b37ca930b60b5a2da7c21404dc7aaddbb66e8ad72f2eeece22afdcd18773154e88a3bd4a27b1a88238fb9b49512f12541ae306499204ea903931549f867f75d
7
+ data.tar.gz: 46741c1e2fef512e76fa216d269a2dbd22f321d5bee007848f6169d2112d29934805cdf5a5bf7c03198fe719ac80f9009bed98201ecb7742cb23372b19f01f10
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Josso
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
@@ -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.0
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-05-02 00:00:00.000000000 Z
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.8
106
+ rubygems_version: 2.6.11
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: A Josso strategy for OmniAuth