Class: OpenIDTokenProxy::Config
- Inherits:
-
Object
- Object
- OpenIDTokenProxy::Config
- Defined in:
- lib/openid_token_proxy/config.rb
Instance Attribute Summary collapse
-
#authorization_endpoint ⇒ Object
Returns the value of attribute authorization_endpoint.
-
#authorization_uri ⇒ Object
Returns the value of attribute authorization_uri.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#domain_hint ⇒ Object
Returns the value of attribute domain_hint.
-
#end_session_endpoint ⇒ Object
Returns the value of attribute end_session_endpoint.
-
#issuer ⇒ Object
Returns the value of attribute issuer.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
-
#public_keys ⇒ Object
Returns the value of attribute public_keys.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#token_acquirement_hook ⇒ Object
Returns the value of attribute token_acquirement_hook.
-
#token_endpoint ⇒ Object
Returns the value of attribute token_endpoint.
-
#token_refreshment_hook ⇒ Object
Returns the value of attribute token_refreshment_hook.
-
#userinfo_endpoint ⇒ Object
Returns the value of attribute userinfo_endpoint.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
- #provider_config ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/openid_token_proxy/config.rb', line 17 def initialize @client_id = ENV['OPENID_CLIENT_ID'] @client_secret = ENV['OPENID_CLIENT_SECRET'] @issuer = ENV['OPENID_ISSUER'] @domain_hint = ENV['OPENID_DOMAIN_HINT'] @prompt = ENV['OPENID_PROMPT'] @redirect_uri = ENV['OPENID_REDIRECT_URI'] @resource = ENV['OPENID_RESOURCE'] @authorization_uri = ENV['OPENID_AUTHORIZATION_URI'] @authorization_endpoint = ENV['OPENID_AUTHORIZATION_ENDPOINT'] @token_endpoint = ENV['OPENID_TOKEN_ENDPOINT'] @userinfo_endpoint = ENV['OPENID_USERINFO_ENDPOINT'] @end_session_endpoint = ENV['OPENID_END_SESSION_ENDPOINT'] @token_acquirement_hook = proc { } @token_refreshment_hook = proc { } yield self if block_given? end |
Instance Attribute Details
#authorization_endpoint ⇒ Object
Returns the value of attribute authorization_endpoint.
10 11 12 |
# File 'lib/openid_token_proxy/config.rb', line 10 def @authorization_endpoint end |
#authorization_uri ⇒ Object
Returns the value of attribute authorization_uri.
8 9 10 |
# File 'lib/openid_token_proxy/config.rb', line 8 def @authorization_uri end |
#client_id ⇒ Object
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/openid_token_proxy/config.rb', line 5 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
5 6 7 |
# File 'lib/openid_token_proxy/config.rb', line 5 def client_secret @client_secret end |
#domain_hint ⇒ Object
Returns the value of attribute domain_hint.
6 7 8 |
# File 'lib/openid_token_proxy/config.rb', line 6 def domain_hint @domain_hint end |
#end_session_endpoint ⇒ Object
Returns the value of attribute end_session_endpoint.
10 11 12 |
# File 'lib/openid_token_proxy/config.rb', line 10 def end_session_endpoint @end_session_endpoint end |
#issuer ⇒ Object
Returns the value of attribute issuer.
5 6 7 |
# File 'lib/openid_token_proxy/config.rb', line 5 def issuer @issuer end |
#prompt ⇒ Object
Returns the value of attribute prompt.
6 7 8 |
# File 'lib/openid_token_proxy/config.rb', line 6 def prompt @prompt end |
#public_keys ⇒ Object
Returns the value of attribute public_keys.
15 16 17 |
# File 'lib/openid_token_proxy/config.rb', line 15 def public_keys @public_keys end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
6 7 8 |
# File 'lib/openid_token_proxy/config.rb', line 6 def redirect_uri @redirect_uri end |
#resource ⇒ Object
Returns the value of attribute resource.
6 7 8 |
# File 'lib/openid_token_proxy/config.rb', line 6 def resource @resource end |
#token_acquirement_hook ⇒ Object
Returns the value of attribute token_acquirement_hook.
13 14 15 |
# File 'lib/openid_token_proxy/config.rb', line 13 def token_acquirement_hook @token_acquirement_hook end |
#token_endpoint ⇒ Object
Returns the value of attribute token_endpoint.
10 11 12 |
# File 'lib/openid_token_proxy/config.rb', line 10 def token_endpoint @token_endpoint end |
#token_refreshment_hook ⇒ Object
Returns the value of attribute token_refreshment_hook.
14 15 16 |
# File 'lib/openid_token_proxy/config.rb', line 14 def token_refreshment_hook @token_refreshment_hook end |
#userinfo_endpoint ⇒ Object
Returns the value of attribute userinfo_endpoint.
10 11 12 |
# File 'lib/openid_token_proxy/config.rb', line 10 def userinfo_endpoint @userinfo_endpoint end |
Instance Method Details
#provider_config ⇒ Object
40 41 42 43 44 45 |
# File 'lib/openid_token_proxy/config.rb', line 40 def provider_config # TODO: Add support for refreshing provider configuration @provider_config ||= begin OpenIDConnect::Discovery::Provider::Config.discover! issuer end end |