psu_identity 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/psu_identity/directory_service/client.rb +7 -0
- data/lib/psu_identity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51ee8619629274ba4e705f67c851420a9a3e773ab3d5bbd1e08587ebe64f3ecb
|
4
|
+
data.tar.gz: 4bf4eacbc97b634d13bae26652362343e1c3c8780d3dfb455371b10ab85fa6e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3781788fd2253c99aa1113952502473e1ebd1d58fabf4d1771d56e7831db33085a4433f3bb256f890e06ca51271a73354443c999ced1202446cb421e45c5417f
|
7
|
+
data.tar.gz: 92a6c28a1eb7ba9e8f3169fdb4ae116f45334b5b62f2e992ce3b9272298a467b01430242cb34a7b1fe4890caf9abf174682d814649b2fefe5b93cc4f0341bf8a
|
data/Gemfile.lock
CHANGED
@@ -20,6 +20,8 @@ module PsuIdentity::DirectoryService
|
|
20
20
|
# @param [Hash] args of options to pass to the endpoint
|
21
21
|
# @option args [String] :userid of the person
|
22
22
|
def userid(userid)
|
23
|
+
raise NotFound if /\A[[:space:]]*\z/.match?(userid.to_s)
|
24
|
+
|
23
25
|
process_userid_response connection.get("#{base_url}/people/#{userid}")
|
24
26
|
end
|
25
27
|
|
@@ -49,12 +51,17 @@ module PsuIdentity::DirectoryService
|
|
49
51
|
def token
|
50
52
|
oauth_client = OAuth2::Client.new(client_id,
|
51
53
|
client_secret, site: oauth_endpoint,
|
54
|
+
auth_scheme:,
|
52
55
|
authorize_url: '/oauth/api/authz',
|
53
56
|
token_url: '/oauth/api/token')
|
54
57
|
oauth_token = oauth_client.client_credentials.get_token
|
55
58
|
oauth_token.token
|
56
59
|
end
|
57
60
|
|
61
|
+
def auth_scheme
|
62
|
+
@auth_scheme ||= ENV.fetch('PSU_ID_AUTH_SCHEME', 'request_body').to_sym
|
63
|
+
end
|
64
|
+
|
58
65
|
def client_id
|
59
66
|
@client_id ||= ENV.fetch('PSU_ID_OAUTH_CLIENT_ID')
|
60
67
|
end
|
data/lib/psu_identity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: psu_identity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kiessling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|