class Conjur::API::APIKeyAuthenticator

When the API is constructed with an API key, the token can be refreshed using the username and API key. This authenticator assumes that the token was minted immediately before the API instance was created.

Attributes

account[R]
api_key[R]
username[R]

Public Class Methods

new(account, username, api_key) click to toggle source
# File lib/conjur/base.rb, line 214
def initialize account, username, api_key
  @account = account
  @username = username
  @api_key = api_key

  update_token_born
end

Public Instance Methods

refresh_token() click to toggle source
# File lib/conjur/base.rb, line 222
def refresh_token
  Conjur::API.authenticate(username, api_key, account: account).tap do
    update_token_born
  end
end