Module: Api::Authentication

Included in:
Client
Defined in:
lib/api/authentication.rb

Overview

Authentication methods for Client

Instance Method Summary collapse

Instance Method Details

#basic_authenticated?Boolean

Indicates if the client was supplied basic auth credentials

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/api/authentication.rb', line 18

def basic_authenticated?
  !@basic_login.nil? && !@basic_login.empty? &&
    !@basic_password.nil? && !@basic_password.empty?
end

#token_authenticated?Boolean

Indicates if the client was supplied an access token

Returns:

  • (Boolean)


10
11
12
# File 'lib/api/authentication.rb', line 10

def token_authenticated?
  !@access_token.nil? && !@access_token.empty?
end