Class: Vault::SecretAuth

Inherits:
Response show all
Defined in:
lib/vault/api/secret.rb

Overview

SecretAuth is a struct that contains the information about auth data, if present. This is never returned alone and is usually embededded in a Secret.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Response

#==, decode, #initialize, #to_h

Constructor Details

This class inherits a constructor from Vault::Response

Instance Attribute Details

#accessorString (readonly)

Accessor for the token. This is like a ‘lease_id`, but for a token.

Returns:

  • (String)


108
# File 'lib/vault/api/secret.rb', line 108

field :accessor

#client_tokenString (readonly)

The client token for this authentication.

Returns:

  • (String)


113
# File 'lib/vault/api/secret.rb', line 113

field :client_token

#lease_durationFixnum (readonly)

Number of seconds the token is valid.

Returns:

  • (Fixnum)


118
# File 'lib/vault/api/secret.rb', line 118

field :lease_duration

#metadataHash<Symbol, Object>? (readonly)

Arbitrary metadata from the authentication.

Examples:

Listing metadata attached to an authentication

auth. #=> { :username => "sethvargo" }

Returns:

  • (Hash<Symbol, Object>, nil)


127
# File 'lib/vault/api/secret.rb', line 127

field :metadata, freeze: true

#policiesArray<String>? (readonly)

List of policies attached to this authentication.

Examples:

Listing policies attached to an authentication

auth.policies #=> ["default"]

Returns:

  • (Array<String>, nil)


136
# File 'lib/vault/api/secret.rb', line 136

field :policies, freeze: true

#renewableBoolean (readonly)

Returns whether this authentication is renewable.

Examples:

Checking if an authentication is renewable

auth.renewable? #=> false

Returns:

  • (Boolean)


145
# File 'lib/vault/api/secret.rb', line 145

field :renewable, as: :renewable?