Module: Tacokit::Client::Tokens

Included in:
Tacokit::Client
Defined in:
lib/tacokit/client/tokens.rb

Overview

Methods for the Tokens API

See Also:

Instance Method Summary (collapse)

Instance Method Details

- (Object) delete_token(token)

Delete an authorization token

Examples:

Delete an authorization token

Tacokit.delete_token("aToken")

Parameters:

  • token (String)

    the token identifier

See Also:



20
21
22
# File 'lib/tacokit/client/tokens.rb', line 20

def delete_token(token)
  delete token_path(token)
end

- (Tacokit::Resource) token(token, options = nil)

Get an authorization token

Parameters:

  • token (String)

    the token identifier

  • options (Hash) (defaults to: nil)

    options to fetch the token with

Returns:

See Also:



11
12
13
# File 'lib/tacokit/client/tokens.rb', line 11

def token(token, options = nil)
  get token_path(token), options
end

- (Object) token_resource(token, resource, *paths)



25
26
27
28
# File 'lib/tacokit/client/tokens.rb', line 25

def token_resource(token, resource, *paths)
  paths, options = extract_options(camp(resource), *paths)
  get token_path(token, *paths), options
end