Class: HoninClient::Configuration
- Inherits:
-
Object
- Object
- HoninClient::Configuration
- Defined in:
- lib/honin/client/configuration.rb
Instance Attribute Summary collapse
-
#base_path ⇒ Object
Returns the value of attribute base_path.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#idp_url ⇒ Object
Returns the value of attribute idp_url.
-
#issuer ⇒ Object
Defaults to idp_url + base_path, matching the engine’s jwt_issuer convention.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#scope ⇒ Object
Returns the value of attribute scope.
Instance Method Summary collapse
- #authorize_url ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #jwks_uri ⇒ Object
- #token_url ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 |
# File 'lib/honin/client/configuration.rb', line 8 def initialize @idp_url = "https://honin.id" @base_path = "" @scope = "email profile" end |
Instance Attribute Details
#base_path ⇒ Object
Returns the value of attribute base_path.
5 6 7 |
# File 'lib/honin/client/configuration.rb', line 5 def base_path @base_path end |
#client_id ⇒ Object
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/honin/client/configuration.rb', line 5 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
5 6 7 |
# File 'lib/honin/client/configuration.rb', line 5 def client_secret @client_secret end |
#idp_url ⇒ Object
Returns the value of attribute idp_url.
5 6 7 |
# File 'lib/honin/client/configuration.rb', line 5 def idp_url @idp_url end |
#issuer ⇒ Object
Defaults to idp_url + base_path, matching the engine’s jwt_issuer convention. Override when your Honin instance uses a custom issuer string.
16 17 18 |
# File 'lib/honin/client/configuration.rb', line 16 def issuer @issuer || "#{idp_url}#{base_path}" end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
5 6 7 |
# File 'lib/honin/client/configuration.rb', line 5 def redirect_uri @redirect_uri end |
#scope ⇒ Object
Returns the value of attribute scope.
5 6 7 |
# File 'lib/honin/client/configuration.rb', line 5 def scope @scope end |
Instance Method Details
#authorize_url ⇒ Object
20 21 22 |
# File 'lib/honin/client/configuration.rb', line 20 def "#{idp_url}#{base_path}/oauth/authorize" end |
#jwks_uri ⇒ Object
28 29 30 |
# File 'lib/honin/client/configuration.rb', line 28 def jwks_uri "#{idp_url}#{base_path}/.well-known/jwks.json" end |
#token_url ⇒ Object
24 25 26 |
# File 'lib/honin/client/configuration.rb', line 24 def token_url "#{idp_url}#{base_path}/oauth/token" end |