class Rjawbone::Client

Attributes

access_token[RW]
refresh_token[RW]

Public Class Methods

new(options = {}) { |self| ... } click to toggle source
# File lib/rjawbone/client.rb, line 8
def initialize(options = {})
  @access_token = options[:access_token]
  @refresh_token = options[:refresh_token]
  yield self if block_given?
end

Public Instance Methods

auth_header() click to toggle source
# File lib/rjawbone/client.rb, line 18
def auth_header
  unless access_token
    raise Rjawbone::NoAccessToken.new("No access_token present in client")
  end
  {"Authorization" => "Bearer #{access_token}"}
end
check_refresh() click to toggle source
# File lib/rjawbone/client.rb, line 25
def check_refresh

end
user_token?() click to toggle source
# File lib/rjawbone/client.rb, line 14
def user_token?
  !!(access_token && refresh_token)
end