oidc_provider 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4da8e2299c7665d720c58eac0e36869b933d65295ce2e90ec5362431bdcb22aa
4
- data.tar.gz: 5b6d2d403368ec78709ce3e9ccedd0cf0ffe267d778db03e0c673c4402b85ea6
3
+ metadata.gz: da21094ceda40451619c72e143399acf170b98f031eae7e0db2ec7e0e7dd97a6
4
+ data.tar.gz: 41be8a950f2a1c96afae1c8db4e2ea8f3ac1629419ef206c4123580426f5a125
5
5
  SHA512:
6
- metadata.gz: a2d92c3d60315fe73a367de0447f0f9f7155f12062b90e9440560e6d5d5011c21914ea16ba085381b8a5fa8ca23f9b0570e936c63893d27090f88924d20b4e84
7
- data.tar.gz: 3ede21e99bfc0cf3b48145ac28889a4ddef6ddeac15ac931030bcf67f18d6df16b055ccf9338751df687dad8c949f616fe5e184300a2e9e230baee14395e6537
6
+ metadata.gz: 76a5ece3b674d0ab2e72af183c3333dcbe3fbb347f0503ce1aafc09b0cfbd1ba7e66ebe3f0ad2393953a5686875cc2f5f22e5dc557e6bc37de204c2b7ec2cd41
7
+ data.tar.gz: eb859617ee41d779fc5e34ac2af239ab2d87b48634c5639080496930aff58cab487292660c520a3f336d451f40ea87f1fb32ec0cfb5beb4c14d9ffb636331ad2
data/README.md CHANGED
@@ -92,5 +92,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
92
92
 
93
93
  ```
94
94
  gem build oidc_provider.gemspec
95
- gem push oidc_provider-0.3.2.gem
95
+ gem push oidc_provider-0.3.10.gem
96
96
  ```
@@ -1,5 +1,25 @@
1
1
  module OIDCProvider
2
2
  class ApplicationController < ActionController::Base
3
- include Concerns::Authentication
3
+ def oidc_current_account
4
+ send(OIDCProvider.current_account_method)
5
+ end
6
+
7
+ def current_token
8
+ @current_token ||= request.env[Rack::OAuth2::Server::Resource::ACCESS_TOKEN]
9
+ end
10
+
11
+ def require_authentication
12
+ send(OIDCProvider.current_authentication_method)
13
+ end
14
+
15
+ def require_access_token
16
+ unless current_token
17
+ raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
18
+ end
19
+ end
20
+
21
+ def unauthenticate!
22
+ send(OIDCProvider.current_unauthenticate_method)
23
+ end
4
24
  end
5
25
  end
@@ -1,3 +1,3 @@
1
1
  module OIDCProvider
2
- VERSION = '0.3.9'
2
+ VERSION = '0.3.10'
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.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Carey
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -50,7 +50,6 @@ files:
50
50
  - Rakefile
51
51
  - app/controllers/oidc_provider/application_controller.rb
52
52
  - app/controllers/oidc_provider/authorizations_controller.rb
53
- - app/controllers/oidc_provider/concerns/authentication.rb
54
53
  - app/controllers/oidc_provider/concerns/connect_endpoint.rb
55
54
  - app/controllers/oidc_provider/discovery_controller.rb
56
55
  - app/controllers/oidc_provider/sessions_controller.rb
@@ -75,11 +74,11 @@ files:
75
74
  - lib/oidc_provider/user_info_builder.rb
76
75
  - lib/oidc_provider/version.rb
77
76
  - lib/tasks/openid/connect/provider_tasks.rake
78
- homepage: http://brandnewbox.com
77
+ homepage: https://github.com/brandnewbox/oidc_provider
79
78
  licenses:
80
79
  - MIT
81
80
  metadata: {}
82
- post_install_message:
81
+ post_install_message:
83
82
  rdoc_options: []
84
83
  require_paths:
85
84
  - lib
@@ -94,8 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
93
  - !ruby/object:Gem::Version
95
94
  version: '0'
96
95
  requirements: []
97
- rubygems_version: 3.0.3
98
- signing_key:
96
+ rubygems_version: 3.3.7
97
+ signing_key:
99
98
  specification_version: 4
100
99
  summary: Uses the openid_connect gem to turn a Rails app into an OpenID Connect provider.
101
100
  test_files: []
@@ -1,27 +0,0 @@
1
- module OIDCProvider
2
- module Concerns
3
- module Authentication
4
- def oidc_current_account
5
- send(OIDCProvider.current_account_method)
6
- end
7
-
8
- def current_token
9
- @current_token ||= request.env[Rack::OAuth2::Server::Resource::ACCESS_TOKEN]
10
- end
11
-
12
- def require_authentication
13
- send(OIDCProvider.current_authentication_method)
14
- end
15
-
16
- def require_access_token
17
- unless current_token
18
- raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
19
- end
20
- end
21
-
22
- def unauthenticate!
23
- send(OIDCProvider.current_unauthenticate_method)
24
- end
25
- end
26
- end
27
- end