Class: RubyApp::Elements::Pages::Authentication::OpenId::AxAuthenticationPage
- Inherits:
-
EmailAuthenticationPage
- Object
- RubyApp::Element
- Base::BasePage
- RubyApp::Elements::Page
- Base::BaseAuthenticationPage
- AuthenticationPage
- EmailAuthenticationPage
- RubyApp::Elements::Pages::Authentication::OpenId::AxAuthenticationPage
- Defined in:
- lib/ruby_app/elements/pages/authentication/open_id/ax_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) ⇒ AxAuthenticationPage
constructor
A new instance of AxAuthenticationPage.
- #process_request(request) ⇒ Object
Methods inherited from EmailAuthenticationPage
Methods inherited from Base::BasePage
#[], #[]=, #interval, #interval=
Methods included from Mixins::HashMixin
Methods inherited from RubyApp::Element
#element_id, get_content_type, get_element
Methods included from Mixins::ConfigurationMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
#exclude_parent_template, #exclude_parent_template?, #get_template, #get_templates, #template_name, #template_path
Methods included from Mixins::RenderMixin
#content_for, #render, #rendered?, #templates
Constructor Details
#initialize(identifier) ⇒ AxAuthenticationPage
Returns a new instance of AxAuthenticationPage.
22 23 24 |
# File 'lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb', line 22 def initialize(identifier) super(identifier) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RubyApp::Mixins::HashMixin
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/ax_authentication_page.rb', line 32 def create_identity_from_response(response) ax_response = ::OpenID::AX::FetchResponse.from_success_response(response) if ax_response self.create_identity_from_email(ax_response.data[self.configuration.attributes.email].first) else super(response) end end |
#process_request(request) ⇒ Object
26 27 28 29 30 |
# File 'lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb', line 26 def process_request(request) ax_request = ::OpenID::AX::FetchRequest.new ax_request.add(::OpenID::AX::AttrInfo.new(self.configuration.attributes.email, 'Email', true)) request.add_extension(ax_request) end |