Sha256: 5889fe692952ca0c24168d6c898b51f8cd2b219b46766ef4e2be94cc6c7c8e56

Contents?: true

Size: 307 Bytes

Versions: 6

Compression:

Stored size: 307 Bytes

Contents

Warden::Manager.after_authentication do |user, auth, options|
  if user.respond_to?(:with_safeguard_authentication?)
    if auth.session(options[:scope])[:with_safeguard_authentication] = user.with_safeguard_authentication?(auth.request)
      auth.session(options[:scope])[:id] = user.id
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
safeguard-devise-0.0.7 lib/devise-safeguard/hooks/safeguard_authenticatable.rb
safeguard-devise-0.0.6 lib/devise-safeguard/hooks/safeguard_authenticatable.rb
safeguard-devise-0.0.5 lib/devise-safeguard/hooks/safeguard_authenticatable.rb
safeguard-devise-0.0.4 lib/devise-safeguard/hooks/safeguard_authenticatable.rb
safeguard-devise-0.0.3 lib/devise-safeguard/hooks/safeguard_authenticatable.rb
safeguard-devise-0.0.2 lib/devise-safeguard/hooks/safeguard_authenticatable.rb