123456789_123456789_123456789_123456789_123456789_

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

Instance Attribute Summary

Instance Attribute Details

#access_tokenString (readonly)

Returns:

[ GitHub ]

  
# 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.

Returns:

  • (true | false)

    Whether the access token is expired.

[ GitHub ]

  
# File 'lib/mongo/crypt/kms/azure/access_token.rb', line 47

def expired?
  Time.now.to_i >= @expires_at - 60
end

#expires_inInteger (readonly)

Returns:

[ GitHub ]

  
# File 'lib/mongo/crypt/kms/azure/access_token.rb', line 29

attr_reader :expires_in