omniauth-adfs-open-id-connect 0.0.2 → 0.0.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49a5969f3197b44a42d24358162f2af9a422eddea3f7a52e40c948a588169f7d
|
4
|
+
data.tar.gz: cbc387d08c503893d690a73912432005c627127cc7fea0a2b369f88e6168bf9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c60f8a08bf795e8ebfbe1f51ef908164ffdb5f750625249ac5a79b676db921ea8b6f43d2fe27c758351c9bd082a242cb18f12e2c1db84da73fa66129a828dd3
|
7
|
+
data.tar.gz: c87a27899e1e17909d54919cda6d7937434b35ed681e308472afd3e4a13d90260ec5fbd4e94b2753e1edcaf78d608758701fd6e0aa811b0b0d6b0d8eb15ad451
|
@@ -40,6 +40,31 @@ module OmniAuth
|
|
40
40
|
def callback_url
|
41
41
|
full_host + script_name + callback_path
|
42
42
|
end
|
43
|
+
|
44
|
+
# The omniauth-azure-activedirectory-v2 gem implements the raw_info method as follows.
|
45
|
+
# It's unclear if this is required for AD FS, but will implement with the fallback on
|
46
|
+
# the ID token just as a precaution and we can later remove and use access_token.token directly
|
47
|
+
# if it's not needed.
|
48
|
+
#
|
49
|
+
# Some account types from Microsoft seem to only have a decodable ID token,
|
50
|
+
# with JWT unable to decode the access token. Information is limited in those
|
51
|
+
# cases. Other account types provide an expanded set of data inside the auth
|
52
|
+
# token, which does decode as a JWT.
|
53
|
+
#
|
54
|
+
# Merge the two, allowing the expanded auth token data to overwrite the ID
|
55
|
+
# token data if keys collide, and use this as raw info.
|
56
|
+
#
|
57
|
+
def raw_info
|
58
|
+
if @raw_info.nil?
|
59
|
+
id_token_data = ::JWT.decode(access_token.params['id_token'], nil, false).first rescue {}
|
60
|
+
auth_token_data = ::JWT.decode(access_token.token, nil, false).first rescue {}
|
61
|
+
|
62
|
+
id_token_data.merge!(auth_token_data)
|
63
|
+
@raw_info = id_token_data
|
64
|
+
end
|
65
|
+
|
66
|
+
@raw_info
|
67
|
+
end
|
43
68
|
end
|
44
69
|
end
|
45
70
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-adfs-open-id-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Marcet
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email:
|
113
113
|
- systems@controlshiftlabs.com
|
114
114
|
executables: []
|
@@ -134,7 +134,7 @@ homepage: https://github.com/controlshift/omniauth-adfs-open-id-connect
|
|
134
134
|
licenses:
|
135
135
|
- MIT
|
136
136
|
metadata: {}
|
137
|
-
post_install_message:
|
137
|
+
post_install_message:
|
138
138
|
rdoc_options: []
|
139
139
|
require_paths:
|
140
140
|
- lib
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubygems_version: 3.1.6
|
153
|
-
signing_key:
|
153
|
+
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: OAuth 2 authentication with Active Directory Federations Services OpenId
|
156
156
|
Connect.
|