Hash
This is a class which is yielded on use Warden::Manager. If you have a plugin and wants to add more configuration to warden, you just need to extend this class.
Set the default strategies to use. :api: public
# File lib/warden/config.rb, line 62 def default_strategies(*strategies) opts = Hash === strategies.last ? strategies.pop : {} hash = self[:default_strategies] scope = opts[:scope] || :_all hash[scope] = strategies.flatten unless strategies.empty? hash[scope] || hash[:_all] || [] end
# File lib/warden/config.rb, line 44 def initialize_copy(other) super deep_dup(:scope_defaults, other) deep_dup(:default_strategies, other) end
A short hand way to set up a particular scope :api: public
# File lib/warden/config.rb, line 73 def scope_defaults(scope, opts = {}) if strategies = opts.delete(:strategies) default_strategies(strategies, :scope => scope) end if opts.empty? self[:scope_defaults][scope] || {} else self[:scope_defaults][scope] ||= {} self[:scope_defaults][scope].merge!(opts) end end
Hook from configuration to serialize_from_session. :api: public
# File lib/warden/config.rb, line 100 def serialize_from_session(*args, &block) Warden::Manager.serialize_from_session(*args, &block) end
Hook from configuration to serialize_into_session. :api: public
# File lib/warden/config.rb, line 94 def serialize_into_session(*args, &block) Warden::Manager.serialize_into_session(*args, &block) end
Generated with the Darkfish Rdoc Generator 2.