oidc_provider 0.3.3 → 0.3.8

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: af88d7a1a90be16f18a1725d75375b20b2b0b7586436f092832d039e4ca799db
4
- data.tar.gz: 837fd66a06796b8e61339bd65315b1cec835aa8c4562b1c78d1ef4c1e7962b34
3
+ metadata.gz: cb23ef5e321d9cb62cc42b2dc12f889d0cb1afdf196a0325cf366c5e51042041
4
+ data.tar.gz: 9c8561368c279b8357010eba05af33273ae9edd65f9a79abb3ecc816db740e78
5
5
  SHA512:
6
- metadata.gz: 269012396cb7b2b8f4d433bedfdec0e672783f15fd491e0f57a286efdc53c17caddcc9dd52ec68db1474f0c63dfa44e6272886a2d6283d0e492456594a8f8a1c
7
- data.tar.gz: 148d4541487dafcb2386f3acc0071b5bab1c711a4ed8d7f732fd9ea145134b34f3f6c1f3829ff6098483f4ad78f0e0bf7b3d0161b412ad3002cecd09ecb791a5
6
+ metadata.gz: b70af33eb18c724ea06966d38095ba2721cb95f2724b1a29b098a2e4960f166863475d96d702554747e08b252adb237ed8091d5ccd062931886bb54e78f936cf
7
+ data.tar.gz: dead7551211061e07783f4120c3abd1b8c9dedb3c048c8636feeabeec9ee97ce444a83a1b29e64c84eaab6729a89a1d7ba1cb55995ab15c21df440bb96e4db1e
@@ -18,6 +18,10 @@ module OIDCProvider
18
18
  raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
19
19
  end
20
20
  end
21
+
22
+ def unauthenticate!
23
+ send(OIDCProvider.current_unauthenticate_method)
24
+ end
21
25
  end
22
26
  end
23
27
  end
@@ -4,7 +4,8 @@ module OIDCProvider
4
4
 
5
5
  def destroy
6
6
  unauthenticate!
7
- redirect_to root_url
7
+ redirect_to "/" unless OIDCProvider.after_sign_out_path
8
+ redirect_to OIDCProvider.after_sign_out_path.respond_to?(:call) ? OIDCProvider.after_sign_out_path.call(params) : OIDCProvider.after_sign_out_path
8
9
  end
9
10
  end
10
11
  end
@@ -34,9 +34,14 @@ module OIDCProvider
34
34
  mattr_accessor :current_authentication_method
35
35
  @@current_authentication_method = :authenticate_user!
36
36
 
37
+ mattr_accessor :current_unauthenticate_method
38
+ @@current_unauthenticate_method = :sign_out
39
+
37
40
  mattr_accessor :account_identifier
38
41
  @@account_identifier = :id
39
42
 
43
+ mattr_accessor :after_sign_out_path
44
+
40
45
  def self.add_client(&block)
41
46
  @@clients << Client::Builder.new(&block).build
42
47
  end
@@ -1,3 +1,3 @@
1
1
  module OIDCProvider
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oidc_provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Carey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-09 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.7.6.2
97
+ rubygems_version: 3.0.3
99
98
  signing_key:
100
99
  specification_version: 4
101
100
  summary: Uses the openid_connect gem to turn a Rails app into an OpenID Connect provider.