class Omniauth::Wrapper::Provider::Facebook
Attributes
auth_hash[R]
Public Class Methods
new(auth_hash)
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 9 def initialize(auth_hash) @auth_hash = auth_hash end
Public Instance Methods
access_token()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 33 def access_token @access_token ||= credentials['token'] end
credentials()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 21 def credentials @credentials ||= (auth_hash['credentials'] || {}) end
extra()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 25 def extra @extra ||= (auth_hash['extra'] || {}) end
info()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 29 def info @extra ||= (auth_hash['info'] || {}) end
provider()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 17 def provider @provider ||= auth_hash['provider'].to_s.downcase end
token_expires_at()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 37 def token_expires_at @token_expires_at ||= parse_datetime(credentials['expires_at']) end
uid()
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 13 def uid @uid ||= auth_hash['uid'] end
Protected Instance Methods
parse_datetime(value)
click to toggle source
# File lib/omniauth/wrapper/provider/facebook.rb, line 42 def parse_datetime(value) return nil if value.nil? || value.to_i.zero? Time.at(value.to_i).to_datetime end