Module: Flattr::Authenticatable

Included in:
Client
Defined in:
lib/flattr/authenticatable.rb

Instance Method Summary collapse

Instance Method Details

#credentialsHash

Credentials hash

Returns:



6
7
8
9
10
11
12
# File 'lib/flattr/authenticatable.rb', line 6

def credentials
  {
    :client_id     => client_id,
    :client_secret => client_secret,
    :access_token  => access_token,
  }
end

#credentials?Boolean

Check whether credentials are present

Returns:

  • (Boolean)


17
18
19
20
21
22
23
24
25
# File 'lib/flattr/authenticatable.rb', line 17

def credentials?
  if credentials[:access_token]
    true
  elsif credentials[:client_id] && credentials[:client_secret]
    true
  else
    false
  end
end