Sha256: 90bf7ad7890ab727bc727706ca88b3cf526aa353441f26974852f428fa806a27
Contents?: true
Size: 1019 Bytes
Versions: 11
Compression:
Stored size: 1019 Bytes
Contents
require 'active_support' # :nodoc: namespace module Authpwn # Included by the model class that roots various credentials. # # Parts of the codebase assume the model will be named Credential. module CredentialModel extend ActiveSupport::Concern included do # The user whose token this is. belongs_to :user, inverse_of: :credentials validates :user, presence: true # Name that can be used to find the token. validates :name, length: { in: 1..128, allow_nil: true }, uniqueness: { scope: [:type], allow_nil: true } # Secret information associated with the token. validates :key, length: { in: 1..2.kilobytes, allow_nil: true } if ActiveRecord::Base.respond_to? :mass_assignment_sanitizer= attr_accessible end end # Included in the metaclass of models that call pwnauth_facebook_token_model. module ClassMethods end # module Authpwn::FacebookTokenModel::ClassMethods end # namespace Authpwn::FacebookTokenModel end # namespace Authpwn
Version data entries
11 entries across 11 versions & 1 rubygems