Sha256: 45a82e598130dab23e1e9a1ffa1f8e202c916f56ac5d7988dad1dfae1a3f291b

Contents?: true

Size: 549 Bytes

Versions: 10

Compression:

Stored size: 549 Bytes

Contents

require 'devise-authy/hooks/authy_authenticatable'
module Devise
  module Models
    module AuthyAuthenticatable
      extend ActiveSupport::Concern

      def with_authy_authentication?(request)
        if self.authy_id.present? && self.authy_enabled
          return true
        end

        return false
      end

      module ClassMethods
        def find_by_authy_id(authy_id)
          find(:first, :conditions => {:authy_id => authy_id})
        end

        Devise::Models.config(self, :authy_remember_device)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
devise-authy-1.7.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.6.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.5.3 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.5.2 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.5.1 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.5.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.4.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.3.0 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.2.2 lib/devise-authy/models/authy_authenticatable.rb
devise-authy-1.2.1 lib/devise-authy/models/authy_authenticatable.rb