Class: RubyApp::Elements::Pages::Authentication::OpenID::SRegAuthenticationPage
- Inherits:
-
EmailAuthenticationPage
- Object
- RubyApp::Element
- Base::BasePage
- RubyApp::Elements::Page
- Base::BaseAuthenticationPage
- AuthenticationPage
- EmailAuthenticationPage
- RubyApp::Elements::Pages::Authentication::OpenID::SRegAuthenticationPage
- Defined in:
- lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base::BasePage
Attributes inherited from RubyApp::Element
Instance Method Summary collapse
- #create_identity_from_response(response) ⇒ Object
-
#initialize(identifier) ⇒ SRegAuthenticationPage
constructor
A new instance of SRegAuthenticationPage.
- #process_request(request) ⇒ Object
Methods inherited from EmailAuthenticationPage
Methods inherited from RubyApp::Element
Methods included from Mixins::ConfigureMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
#exclude_parent_template, #exclude_parent_template?, #get_templates, #template_name, #template_path
Methods included from Mixins::RenderMixin
#clear_content_for, #content_for, #render, #rendered?
Constructor Details
#initialize(identifier) ⇒ SRegAuthenticationPage
Returns a new instance of SRegAuthenticationPage.
22 23 24 |
# File 'lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb', line 22 def initialize(identifier) super(identifier) end |
Instance Method Details
#create_identity_from_response(response) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb', line 32 def create_identity_from_response(response) sreg_response = ::OpenID::SReg::Response.from_success_response(response) unless sreg_response.empty? self.create_identity_from_email(sreg_response.data['email']) else super(response) end end |
#process_request(request) ⇒ Object
26 27 28 29 30 |
# File 'lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb', line 26 def process_request(request) sreg_request = ::OpenID::SReg::Request.new sreg_request.request_fields(['email'], true) request.add_extension(sreg_request) end |