Class: CipherStash::AccessKey

Inherits:
Object
  • Object
show all
Defined in:
lib/cipherstash/access_key.rb

Overview

Represents a CipherStash access key.

An access key is a long-term credential suitable for use by non-interactive applications to authenticate their use of a CipherStash workspace.

Instance Attribute Summary collapse

Instance Attribute Details

#created_atTime (readonly)

When the access key was created.

Returns:

  • (Time)


27
28
29
# File 'lib/cipherstash/access_key.rb', line 27

def created_at
  @created_at
end

#idString (readonly)

The globally-unique ID of the access key.

Returns:

  • (String)


17
18
19
# File 'lib/cipherstash/access_key.rb', line 17

def id
  @id
end

#last_used_atTime, NilClass (readonly)

When the access key was last exchanged for an access token.

Returns:

  • (Time, NilClass)

    can be nil if the access key has never been used.



32
33
34
# File 'lib/cipherstash/access_key.rb', line 32

def last_used_at
  @last_used_at
end

#nameString (readonly)

The name given to the access key when it was created.

Returns:

  • (String)


12
13
14
# File 'lib/cipherstash/access_key.rb', line 12

def name
  @name
end

#secret_keyString (readonly)

Note:

this method will only provide the access key for an object returned from CipherStash::Client#create_access_key. Listing access keys does not provide the secret access key.

The complete secret access key.

Returns:

  • (String)


41
42
43
# File 'lib/cipherstash/access_key.rb', line 41

def secret_key
  @secret_key
end

#workspace_idString (readonly)

The ID of the workspace that the access key grants access to.

Returns:

  • (String)


22
23
24
# File 'lib/cipherstash/access_key.rb', line 22

def workspace_id
  @workspace_id
end