You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by singh13 <gs...@gmail.com> on 2012/04/04 19:02:06 UTC

IRequestparameters with OpenID

Hi there
I am creating an OpeniD provider using wicket 1.5.4 and openid4java.

On a part of my login page I have the following:

public LoginPage(PageParameters page){
		super(page);

		if(page.isEmpty()){
			getRequestCycle().scheduleRequestHandlerAfterCurrent(new
IRequestHandler(){
				public void respond(IRequestCycle requestCycle) {
					// TODO Auto-generated method stub
					WebResponse web=(WebResponse)requestCycle.getResponse();
					OpenIDServer.discoveryResponse(web);

				}

				public void detach(IRequestCycle requestCycle) {
					// TODO Auto-generated method stub
					
				}	
	    	});
			
		}else{
			Message response;
			IRequestParameters	irp
=RequestCycle.get().getRequest().getRequestParameters();

			list = toParameterList(irp);
		      OpenIDServer.logRequestParameters(list);

		    String mode = list.hasParameter("openid.mode") ?
list.getParameterValue("openid.mode") : null;
		    
		    if ("associate".equals(mode)){
		    	getRequestCycle().scheduleRequestHandlerAfterCurrent(new
IRequestHandler(){
				public void respond(IRequestCycle requestCycle) {
					// TODO Auto-generated method stub
					WebResponse web=(WebResponse)requestCycle.getResponse();
					OpenIDServer.associate(web, list);
				}
				public void detach(IRequestCycle requestCycle) {
					// TODO Auto-generated method stub
					
				}	
	    	});
	

The first part of the code works (discovery) but when the consumer is
sending the association request to the provider (login page), the request
parameters are empty.

The logs are:

04/04/2012 17:44:03.297 4651 [qtp597295774-21] DEBUG
(org.openid4java.message.ParameterList.createFromKeyValueForm:198)  -
Creating parameter list from key-value form:

04/04/2012 17:44:03.298 4652 [qtp597295774-21] DEBUG
(org.openid4java.message.ParameterList.<init>:33)  - Created empty parameter
list.
04/04/2012 17:44:03.298 4652 [qtp597295774-21] DEBUG
(org.openid4java.message.ParameterList.copyOf:89)  - Copying parameter list:

openid4java creates a parameterlist from a keyvalueform but this is empty.

I have a feeling that the provider is not being sent the association request
because after this step, it goes to the authentication stage and the
requestparameters contain authentication info.

Is there another way to get the request parameters? Or is there something in
the code above that is interfering with the parameterlist request?


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/IRequestparameters-with-OpenID-tp4532565p4532565.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org