Class: OCI::Auth::Signers::ServiceAccountTokenProvider::SuppliedServiceAccountTokenProvider
- Inherits:
-
Object
- Object
- OCI::Auth::Signers::ServiceAccountTokenProvider::SuppliedServiceAccountTokenProvider
- Defined in:
- lib/oci/auth/signers/service_account_token_provider/sa_token_provider.rb
Overview
Class that takes in the service account token from the user
Instance Method Summary collapse
-
#initialize(token_string) ⇒ SuppliedServiceAccountTokenProvider
constructor
A new instance of SuppliedServiceAccountTokenProvider.
- #service_account_token ⇒ Object
Constructor Details
#initialize(token_string) ⇒ SuppliedServiceAccountTokenProvider
Returns a new instance of SuppliedServiceAccountTokenProvider.
37 38 39 |
# File 'lib/oci/auth/signers/service_account_token_provider/sa_token_provider.rb', line 37 def initialize(token_string) @token_string = token_string end |
Instance Method Details
#service_account_token ⇒ Object
41 42 43 44 45 46 |
# File 'lib/oci/auth/signers/service_account_token_provider/sa_token_provider.rb', line 41 def service_account_token is_sa_token_valid = OCI::Auth::Signers::ServiceAccountTokenProvider.valid_sa_token?(@token_string) raise 'The supplied service account token has expired.' if is_sa_token_valid == false @token_string end |