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)


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

field :accessor

#client_tokenString (readonly)

The client token for this authentication.

Returns:

  • (String)


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

field :client_token

#lease_durationFixnum (readonly)

Number of seconds the token is valid.

Returns:

  • (Fixnum)


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

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)


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

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)


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

field :policies, freeze: true

#renewableBoolean (readonly)

Returns whether this authentication is renewable.

Examples:

Checking if an authentication is renewable

auth.renewable? #=> false

Returns:

  • (Boolean)


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

field :renewable, as: :renewable?