omniauth-okta 1.0.0 → 2.0.0

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: 650d54dafaf437d369cb409d744f748555cdd1b7e3c55fc4f32bfba93ad7f5b6
4
- data.tar.gz: 28dc60af8636a5b7c52fc06b4c5d4fad5d2ce552a087d916c266fb08d9d34324
3
+ metadata.gz: bf1f360e75ffe2ebf71886d9e673ccc2624fd0698d77b0e14d64751028460820
4
+ data.tar.gz: eae2dee87d4edde6dc2a9e22658226cbfebae28aa460d4e784049f8be41d9f70
5
5
  SHA512:
6
- metadata.gz: f3ea460bba7ec3750dc952689368e529fcc8b35886559952c9e0dff09b6979852cd0fc89b1cdf86e65f01a0d08ce9de02e89e93d7c2e95e4411a8a951ead4d27
7
- data.tar.gz: fed4566b63e0c4835e08f79393923db0be979344d289a5330261746db6f589dd49f607e1fcf5169da4bdcb73824a5d06315bcee79b63a9c9ca299b08cc48ebcd
6
+ metadata.gz: 6f92276ef9fc24bf1d567e3da039c02fc85ac0c680fc8df77c9f961476a09a601da219348cd7696289a892ce5d6dd8903a42c42d6fd1f5672ec532777eee3b90
7
+ data.tar.gz: fc6918ff1296698f3bff65c77df2041a49d3694882c333cd0e9d2d9a6f28c11896e8a80cb2d2c8af11224f8620dcb5211429779744c2bba5748d054d99ba7bb2
data/Rakefile CHANGED
@@ -14,21 +14,12 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
-
18
-
19
-
20
-
21
-
22
17
  require 'bundler/gem_tasks'
23
18
 
24
- require 'rake/testtask'
25
-
26
- Rake::TestTask.new(:test) do |t|
27
- t.libs << 'lib'
28
- t.libs << 'test'
29
- t.pattern = 'test/**/*_test.rb'
30
- t.verbose = false
19
+ require 'rspec/core/rake_task'
20
+ RSpec::Core::RakeTask.new do |spec|
21
+ spec.pattern = 'spec/**/*_spec.rb'
31
22
  end
32
23
 
33
24
 
34
- task default: :test
25
+ task default: :spec
@@ -40,10 +40,10 @@ module OmniAuth
40
40
  h[:raw_info] = raw_info unless skip_info?
41
41
 
42
42
  if access_token
43
- h[:id_token] = access_token.token
43
+ h[:id_token] = id_token
44
44
 
45
- if !options[:skip_jwt] && !access_token.token.nil?
46
- h[:id_info] = validated_token(access_token.token)
45
+ if !options[:skip_jwt] && !id_token.nil?
46
+ h[:id_info] = validated_token(id_token)
47
47
  end
48
48
  end
49
49
  end
@@ -53,18 +53,6 @@ module OmniAuth
53
53
  options.fetch(:client_options)
54
54
  end
55
55
 
56
- alias :oauth2_access_token :access_token
57
-
58
- def access_token
59
- if oauth2_access_token
60
- ::OAuth2::AccessToken.new(client, oauth2_access_token.token, {
61
- refresh_token: oauth2_access_token.refresh_token,
62
- expires_in: oauth2_access_token.expires_in,
63
- expires_at: oauth2_access_token.expires_at
64
- })
65
- end
66
- end
67
-
68
56
  def raw_info
69
57
  @_raw_info ||= access_token.get(client_options.fetch(:user_info_url)).parsed || {}
70
58
  rescue ::Errno::ETIMEDOUT
@@ -75,6 +63,12 @@ module OmniAuth
75
63
  options[:redirect_uri] || (full_host + callback_path)
76
64
  end
77
65
 
66
+ def id_token
67
+ return if access_token.nil?
68
+
69
+ access_token['id_token']
70
+ end
71
+
78
72
  # Returns the qualified URL for the authorization server
79
73
  #
80
74
  # This is necessary in the case where there is a custom authorization server.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Okta
5
- VERSION = '1.0.0'.freeze
5
+ VERSION = '2.0.0'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-okta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Andrews
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-06 00:00:00.000000000 Z
12
+ date: 2022-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.0.0
123
+ rubygems_version: 3.0.3.1
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Unofficial OmniAuth OAuth2 strategy for Okta