Sha256: 192722d302ce12c9dfcf0bf7b36d6ea5366be3a20bf1024f883c031342e746c8

Contents?: true

Size: 614 Bytes

Versions: 59

Compression:

Stored size: 614 Bytes

Contents

module Auth
	class Identity
	  include Mongoid::Document
	  
	  field :provider, type: String, default: ""
	  field :uid, type: String, default: ""
	  field :email, type:String, default: ""
	  field :access_token, type:String
	  field :token_expires_at, type:Integer

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

	  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

	end

	
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 app/models/auth/identity.rb
wordjelly-auth-1.5.9 app/models/auth/identity.rb
wordjelly-auth-1.5.8 app/models/auth/identity.rb
wordjelly-auth-1.5.7 app/models/auth/identity.rb
wordjelly-auth-1.5.6 app/models/auth/identity.rb
wordjelly-auth-1.5.5 app/models/auth/identity.rb
wordjelly-auth-1.5.4 app/models/auth/identity.rb
wordjelly-auth-1.5.3 app/models/auth/identity.rb
wordjelly-auth-1.5.2 app/models/auth/identity.rb
wordjelly-auth-1.5.1 app/models/auth/identity.rb
wordjelly-auth-1.5.0 app/models/auth/identity.rb
wordjelly-auth-1.4.9 app/models/auth/identity.rb
wordjelly-auth-1.4.8 app/models/auth/identity.rb
wordjelly-auth-1.4.7 app/models/auth/identity.rb
wordjelly-auth-1.4.6 app/models/auth/identity.rb
wordjelly-auth-1.4.5 app/models/auth/identity.rb
wordjelly-auth-1.4.4 app/models/auth/identity.rb
wordjelly-auth-1.4.3 app/models/auth/identity.rb
wordjelly-auth-1.4.2 app/models/auth/identity.rb
wordjelly-auth-1.4.0 app/models/auth/identity.rb