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)


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

field :accessor

#client_tokenString (readonly)

The client token for this authentication.

Returns:

  • (String)


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

field :client_token

#lease_durationFixnum (readonly)

Number of seconds the token is valid.

Returns:

  • (Fixnum)


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

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)


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

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)


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

field :policies, freeze: true

#renewableBoolean (readonly)

Returns whether this authentication is renewable.

Examples:

Checking if an authentication is renewable

auth.renewable? #=> false

Returns:

  • (Boolean)


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

field :renewable, as: :renewable?