Class: OpenFga::TokenManager::Oauth2TokenManager::Config
- Inherits:
-
Object
- Object
- OpenFga::TokenManager::Oauth2TokenManager::Config
- Defined in:
- lib/openfga/token_manager/token_manager.rb
Instance Attribute Summary collapse
-
#audience ⇒ Object
readonly
Returns the value of attribute audience.
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#token_issuer ⇒ Object
readonly
Returns the value of attribute token_issuer.
Instance Method Summary collapse
-
#initialize(client_id:, client_secret:, token_issuer:, audience: nil, logger: nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(client_id:, client_secret:, token_issuer:, audience: nil, logger: nil) ⇒ Config
Returns a new instance of Config.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/openfga/token_manager/token_manager.rb', line 39 def initialize(client_id:, client_secret:, token_issuer:, audience: nil, logger: nil) raise ConfigurationError, 'missing client_id' if client_id.blank? raise ConfigurationError, 'missing client_secret' if client_secret.blank? raise ConfigurationError, 'missing token_issuer' if token_issuer.blank? @client_id = client_id @client_secret = client_secret @token_issuer = token_issuer @audience = audience @logger = logger end |
Instance Attribute Details
#audience ⇒ Object (readonly)
Returns the value of attribute audience.
37 38 39 |
# File 'lib/openfga/token_manager/token_manager.rb', line 37 def audience @audience end |
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
37 38 39 |
# File 'lib/openfga/token_manager/token_manager.rb', line 37 def client_id @client_id end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
37 38 39 |
# File 'lib/openfga/token_manager/token_manager.rb', line 37 def client_secret @client_secret end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
37 38 39 |
# File 'lib/openfga/token_manager/token_manager.rb', line 37 def logger @logger end |
#token_issuer ⇒ Object (readonly)
Returns the value of attribute token_issuer.
37 38 39 |
# File 'lib/openfga/token_manager/token_manager.rb', line 37 def token_issuer @token_issuer end |