Class: RubyApp::Elements::Pages::Authentication::OpenID::AXAuthenticationPage

Inherits:
EmailAuthenticationPage show all
Defined in:
lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb

Instance Attribute Summary

Attributes inherited from Base::BasePage

#interval

Attributes inherited from RubyApp::Element

#attributes

Instance Method Summary collapse

Methods inherited from EmailAuthenticationPage

#create_identity_from_email

Methods inherited from RubyApp::Element

#element_id, get_element

Methods included from Mixins::ConfigureMixin

#configure

Methods included from Mixins::TranslateMixin

#localize, #translate

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) ⇒ 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

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.configure.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.configure.attributes.email, 'Email', true))
  request.add_extension(ax_request)
end