Class: Kpm::AuthToken

Inherits:
OpenAPI::AuthToken
  • Object
show all
Defined in:
lib/kpm/auth_token.rb

Instance Method Summary collapse

Constructor Details

#initializeAuthToken

Returns a new instance of AuthToken.



4
5
6
7
8
# File 'lib/kpm/auth_token.rb', line 4

def initialize
  super ({"expires_in" => 3600,
          "header" => "Authorization",
          "header_format" => "%s"})
end

Instance Method Details

#new_auth_tokenObject



10
11
12
13
14
# File 'lib/kpm/auth_token.rb', line 10

def new_auth_token()
  # auth_response = Kpm.auth(body: {user: {email: Kpm.user, password: Kpm.password}}.to_json)
  # auth_response.authentication_token
  update({"token" => "no-token-required-yet"})
end