Sha256: 8cd5760d0de190883cbbae651056584df12adc3fbf2821f6542c0ff9292192a4

Contents?: true

Size: 623 Bytes

Versions: 118

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

module Aws
  class Token

    # @param [String] token
    # @param [Time] expiration
    def initialize(token, expiration=nil)
      @token = token
      @expiration = expiration
    end

    # @return [String, nil]
    attr_reader :token

    # @return [Time, nil]
    attr_reader :expiration

    # @return [Boolean] Returns `true` if token is set
    def set?
      !token.nil? && !token.empty?
    end

    # Removing the token from the default inspect string.
    # @api private
    def inspect
      "#<#{self.class.name} token=[FILTERED]> expiration=#{expiration}>"
    end

  end
end

Version data entries

118 entries across 118 versions & 1 rubygems

Version Path
aws-sdk-core-3.190.3 lib/aws-sdk-core/token.rb
aws-sdk-core-3.190.2 lib/aws-sdk-core/token.rb
aws-sdk-core-3.190.1 lib/aws-sdk-core/token.rb
aws-sdk-core-3.190.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.189.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.188.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.187.1 lib/aws-sdk-core/token.rb
aws-sdk-core-3.187.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.186.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.185.2 lib/aws-sdk-core/token.rb
aws-sdk-core-3.185.1 lib/aws-sdk-core/token.rb
aws-sdk-core-3.185.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.184.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.183.1 lib/aws-sdk-core/token.rb
aws-sdk-core-3.183.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.182.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.181.1 lib/aws-sdk-core/token.rb
aws-sdk-core-3.181.0 lib/aws-sdk-core/token.rb
aws-sdk-core-3.180.3 lib/aws-sdk-core/token.rb
aws-sdk-core-3.180.2 lib/aws-sdk-core/token.rb