Sha256: 47ec9a33e3f575cec4776159c9a1b5b90ae64a6edf0b0c855259b7198c7c1789

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 Bytes

Contents

module Vxod
  module Db
    class << self
      attr_accessor :identity, :user

      def identity_create(provider, openid, email, firstname, lastname)
        user = self.user.new
        user.auth_key = SecureRandom.base64(64)
        user.email = email
        user.firstname = firstname
        user.lastname = lastname
        user.save!

        identity = self.identity.new
        identity.provider = provider
        identity.openid = openid
        identity.user = user
        identity.save!

        identity
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vxod-0.0.2 lib/vxod/db.rb