Class: SignInService::Sts
- Inherits:
-
Object
- Object
- SignInService::Sts
- Defined in:
- lib/sign_in_service/sts.rb,
lib/sign_in_service/sts/token.rb,
lib/sign_in_service/sts/config.rb
Defined Under Namespace
Constant Summary collapse
- REQUIRED_ATTRIBUTES =
%i[user_identifier issuer service_account_id private_key_path base_url].freeze
Constants included from Token
Token::ACCESS_TOKEN_DURATION, Token::JWT_ENCODE_ALGORITHM, Token::TOKEN_PATH
Constants included from Config
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#private_key_path ⇒ Object
readonly
Returns the value of attribute private_key_path.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
-
#service_account_id ⇒ Object
readonly
Returns the value of attribute service_account_id.
-
#user_attributes ⇒ Object
readonly
Returns the value of attribute user_attributes.
-
#user_identifier ⇒ Object
readonly
Returns the value of attribute user_identifier.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(user_identifier:, **options) ⇒ Sts
constructor
A new instance of Sts.
Methods included from Token
Constructor Details
#initialize(user_identifier:, **options) ⇒ Sts
Returns a new instance of Sts.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/sign_in_service/sts.rb', line 25 def initialize(user_identifier:, **) @user_identifier = user_identifier @issuer = [:issuer] || Config.issuer @scopes = [:scopes] || Config.scopes || [] @service_account_id = [:service_account_id] || Config.service_account_id @user_attributes = [:user_attributes] || Config.user_attributes @private_key_path = [:private_key_path] || Config.private_key_path @base_url = [:base_url] || Config.base_url validate_arguments! end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def base_url @base_url end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def issuer @issuer end |
#private_key_path ⇒ Object (readonly)
Returns the value of attribute private_key_path.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def private_key_path @private_key_path end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def scopes @scopes end |
#service_account_id ⇒ Object (readonly)
Returns the value of attribute service_account_id.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def service_account_id @service_account_id end |
#user_attributes ⇒ Object (readonly)
Returns the value of attribute user_attributes.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def user_attributes @user_attributes end |
#user_identifier ⇒ Object (readonly)
Returns the value of attribute user_identifier.
22 23 24 |
# File 'lib/sign_in_service/sts.rb', line 22 def user_identifier @user_identifier end |
Class Method Details
.configure {|Config| ... } ⇒ Object
17 18 19 |
# File 'lib/sign_in_service/sts.rb', line 17 def configure yield Config end |