Class: Mongo::Crypt::KMS::Azure::AccessToken Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/mongo/crypt/kms/azure/access_token.rb |
Overview
::Mongo::Crypt::KMS::Azure
access token for temporary credentials.
Class Method Summary
-
.new(access_token, expires_in) ⇒ AccessToken
constructor
Internal use only
Creates an
::Mongo::Crypt::KMS::Azure
access token object.
Instance Attribute Summary
- #access_token ⇒ String readonly Internal use only
-
#expired? ⇒ true | false
readonly
Internal use only
Checks if the access token is expired.
- #expires_in ⇒ Integer readonly Internal use only
Instance Attribute Details
#access_token ⇒ String
(readonly)
# File 'lib/mongo/crypt/kms/azure/access_token.rb', line 26
attr_reader :access_token
#expired? ⇒ true
| false
(readonly)
Checks if the access token is expired.
The access token is considered expired if it is within 60 seconds of its expiration time.
# File 'lib/mongo/crypt/kms/azure/access_token.rb', line 47
def expired? Time.now.to_i >= @expires_at - 60 end
#expires_in ⇒ Integer
(readonly)
# File 'lib/mongo/crypt/kms/azure/access_token.rb', line 29
attr_reader :expires_in