Sha256: 8c5c442768f3011ff1cdbd158fb49df0f458da053dc6c007363c23cd16e3d306
Contents?: true
Size: 498 Bytes
Versions: 1
Compression:
Stored size: 498 Bytes
Contents
module Fog module AzureRM module Identity # Credentials stores the access token and its expiry. class Credentials attr_accessor :token, :expires_at EXPIRATION_BUFFER = 600 # 10 minutes def initialize(token, expires_at) @token = token @expires_at = expires_at end def refresh_needed? return true unless expires_at Time.now >= expires_at + EXPIRATION_BUFFER end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gitlab-fog-azure-rm-2.2.0 | lib/fog/azurerm/identity/credentials.rb |