Class: ResoWebApi::Authentication::SimpleTokenAuth

Inherits:
AuthStrategy show all
Defined in:
lib/reso_web_api/authentication/simple_token_auth.rb

Overview

A simple auth strategy that uses a static, non-expiring token.

Constant Summary

Constants inherited from BaseClient

BaseClient::USER_AGENT

Instance Attribute Summary

Attributes inherited from AuthStrategy

#access

Instance Method Summary collapse

Methods inherited from AuthStrategy

#ensure_valid_access!, #reset

Methods inherited from BaseClient

#connection, #headers

Instance Method Details

#authenticateAccess

Simply returns a static, never expiring access token

Returns:

  • (Access)

    The access token object



14
15
16
17
18
19
20
# File 'lib/reso_web_api/authentication/simple_token_auth.rb', line 14

def authenticate
  Access.new(
    'access_token' => access_token,
    'token_type'   => token_type,
    'expires_in'   => 1 << (1.size * 8 - 2) - 1 # Max int value
  )
end