Class: ActionController::Base
- Inherits:
-
Object
- Object
- ActionController::Base
- Defined in:
- lib/hobo_openid.rb
Class Method Summary collapse
-
.openid_login(options = {}) ⇒ Object
Recognized options :login_action - default :openid_login :complete_action - default :complete_openid :openid_opts - forwarded to hobo_openid_login, hobo_openid_complete :openid_opts recognizes :model - class of your user model (required) :login - field of params where users provide openIDs (default :login) :return_to - page to return after OpenID auth.
Class Method Details
.openid_login(options = {}) ⇒ Object
Recognized options
:login_action - default :openid_login
:complete_action - default :complete_openid
:openid_opts - forwarded to hobo_openid_login, hobo_openid_complete
:openid_opts recognizes
:model - class of your user model (required)
:login - field of params where users provide openIDs (default :login)
:return_to - page to return after OpenID auth. -> should point to action executing hobo_openid_complete
:openid_field - field of your user model that stores openID
:mappings - simple registration mappings (currently unsupported)
:redirect_to - where to redirect after success
:*_notice - failure, cancellation, setup_needed, new_user_failure
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hobo_openid.rb', line 19 def self.openid_login( = {}) .reverse_merge!(:login_action => :openid_login, :complete_action => :complete_openid, :openid_opts => Hash.new) include Hobo::OpenidController define_method([:complete_action]) do hobo_openid_complete([:openid_opts]) end define_method([:login_action]) do hobo_openid_login(request, [:openid_opts]) end end |