oidc_provider 0.3.9 → 0.3.10
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: da21094ceda40451619c72e143399acf170b98f031eae7e0db2ec7e0e7dd97a6
|
4
|
+
data.tar.gz: 41be8a950f2a1c96afae1c8db4e2ea8f3ac1629419ef206c4123580426f5a125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76a5ece3b674d0ab2e72af183c3333dcbe3fbb347f0503ce1aafc09b0cfbd1ba7e66ebe3f0ad2393953a5686875cc2f5f22e5dc557e6bc37de204c2b7ec2cd41
|
7
|
+
data.tar.gz: eb859617ee41d779fc5e34ac2af239ab2d87b48634c5639080496930aff58cab487292660c520a3f336d451f40ea87f1fb32ec0cfb5beb4c14d9ffb636331ad2
|
data/README.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
module OIDCProvider
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
-
|
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
|
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.
|
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:
|
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:
|
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.
|
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
|