Class: OmniAuth::Configuration
- Inherits:
-
Object
- Object
- OmniAuth::Configuration
- Includes:
- Singleton
- Defined in:
- lib/omniauth/core.rb
Constant Summary collapse
- @@defaults =
{ :path_prefix => '/auth', :on_failure => Proc.new do |env, | new_path = "#{OmniAuth.config.path_prefix}/failure?message=#{}" [302, {'Location' => "#{new_path}"}, []] end, :form_css => Form::DEFAULT_CSS }
Instance Attribute Summary collapse
-
#form_css ⇒ Object
Returns the value of attribute form_css.
- #on_failure(&block) ⇒ Object
-
#path_prefix ⇒ Object
Returns the value of attribute path_prefix.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 |
# File 'lib/omniauth/core.rb', line 31 def initialize @@defaults.each_pair{|k,v| self.send("#{k}=",v)} end |
Instance Attribute Details
#form_css ⇒ Object
Returns the value of attribute form_css.
44 45 46 |
# File 'lib/omniauth/core.rb', line 44 def form_css @form_css end |
#on_failure(&block) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/omniauth/core.rb', line 35 def on_failure(&block) if block_given? @on_failure = block else @on_failure end end |
#path_prefix ⇒ Object
Returns the value of attribute path_prefix.
44 45 46 |
# File 'lib/omniauth/core.rb', line 44 def path_prefix @path_prefix end |
Class Method Details
.defaults ⇒ Object
27 28 29 |
# File 'lib/omniauth/core.rb', line 27 def self.defaults @@defaults end |