How can I pass additional parameters such as openid.ns.pape and openid.pape.max_auth_age for Google authentication with Rack::OpenID
def new
response.headers['WWW-Authenticate'] = Rack::OpenID.build_header(
:identifier => "https://www.google.com/accounts/o8/id",
:required => ["http://axschema.org/contact/email"],
:return_to => accounts_url,
:method => 'POST')
head 401
end
I just want to force new session for authentication
I am new to rails openid
Thanks in advance.
After a lot of googling I found a soultion for passing
openid.ns.papeparameter inRack::OpenID.The solution is blogged in my personal blog.I just done a Monkey patch for solving this issue.Here is the patch
Since I need this in a rails app I save the above code in initializers (config/initializers/rack_openid_patch.rb) folder. If you are not using rails I think you need to save this and require manually in u’r project.
Now you need to add the pape option to the Rack::OpenID.build_header
Make sure you set max_auth_age = 0, to force google authentication for a new session