Sha256: 52182ff1bea36c6d7ac4c6c6363affd828242c554b9bcab6b5d646832be748b6

Contents?: true

Size: 480 Bytes

Versions: 3

Compression:

Stored size: 480 Bytes

Contents

require 'devise/strategies/authenticatable'

module Devise

  module Strategies
    class RemoteUserAuthenticatable < Authenticatable

      def valid?
        env[DeviseRemoteUser.env_key].present?
      end

      def authenticate!
        resource = mapping.to.find_for_remote_user_authentication(env)
        resource ? success!(resource) : fail
      end

    end
  end
end

Warden::Strategies.add(:remote_user_authenticatable, Devise::Strategies::RemoteUserAuthenticatable)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-remote-user-0.3.0 lib/devise_remote_user/strategy.rb
devise-remote-user-0.2.0 lib/devise_remote_user/strategy.rb
devise-remote-user-0.1.0 lib/devise_remote_user/strategy.rb