Sha256: 18663f0727c5e8fa5ee03fb96524f2f4460e4d226f2f570da57adce58f81084a
Contents?: true
Size: 1.23 KB
Versions: 9
Compression:
Stored size: 1.23 KB
Contents
require 'rubygems' require 'bundler/setup' require 'openid/extensions/sreg' module RubyApp module Elements module Pages module Authentication module OpenID require 'ruby_app/elements/pages/authentication/open_id/authentication_page' require 'ruby_app/session' class SRegAuthenticationPage < RubyApp::Elements::Pages::Authentication::OpenID::AuthenticationPage template_path(:all, File.dirname(__FILE__)) def initialize(identifier) super(identifier) end def process_request(request) sreg_request = ::OpenID::SReg::Request.new sreg_request.request_fields(['email'], true) request.add_extension(sreg_request) end def create_identity_from_response(response) sreg_response = ::OpenID::SReg::Response.from_success_response(response) unless sreg_response.empty? create_identity_from_url(response.identity_url, :email => sreg_response.data['email']) else super(response) end end end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems