Sha256: beb5e32a2818401ddcf30ba2679760ed084b134c15500892950c5299d7966d4b
Contents?: true
Size: 487 Bytes
Versions: 5
Compression:
Stored size: 487 Bytes
Contents
require 'devise/strategies/authenticatable' module Devise module Strategies class RemoteUserAuthenticatable < Authenticatable def valid? DeviseRemoteUser.remote_user_id(env).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
5 entries across 5 versions & 1 rubygems