Class: Auth::Identity

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/auth/identity.rb

Instance Method Summary collapse

Instance Method Details

#build_from_omnihash(omni_hash) ⇒ Object



15
16
17
18
# File 'app/models/auth/identity.rb', line 15

def build_from_omnihash(omni_hash)
	self.email,self.uid,self.provider,self.access_token,self.token_expires_at = omni_hash["info"]["email"],omni_hash["uid"],omni_hash["provider"],omni_hash["credentials"]["token"],omni_hash["credentials"]["expires_at"]	
	self
end

#has_provider?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/models/auth/identity.rb', line 11

def has_provider?
		return (self.provider != "")
end