You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
308 B
Ruby
22 lines
308 B
Ruby
11 years ago
|
class OmniAuthCredentials
|
||
|
|
||
|
attr_reader :omniauth_hash
|
||
|
|
||
|
def initialize(omniauth_hash)
|
||
|
@omniauth_hash = omniauth_hash
|
||
|
end
|
||
|
|
||
|
def provider
|
||
|
omniauth_hash['provider']
|
||
|
end
|
||
|
|
||
|
def uid
|
||
|
omniauth_hash['uid']
|
||
|
end
|
||
|
|
||
|
def email
|
||
|
omniauth_hash['info'] && omniauth_hash['info']['email']
|
||
|
end
|
||
|
|
||
|
end
|