aspose file tools
The moose likes Other Java Products and Servers and the fly likes Add parameters to openId url Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Reply Bookmark "Add parameters to openId url" Watch "Add parameters to openId url" New topic
Author

Add parameters to openId url

malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69
Hi,
I don't know if this is the right place to ask question about OpenId, but here it is.

I am using OpenId4Java to create an OpenId Provider. I have put the sample code in a servlet, and it is working fine.

I would like to know,
When I want to log-in to a site using my google account, I enter https://www.google.com/accounts/o8/id in the openId url. After providing my credentials to Google, the openId url provided to the Relying Party by Google looks like:
https://www.google.com/accounts/o8/id?id=xxxxxxxxxxxxxxxxxx

My openId provider url is http://localhost/myapp/openid.jsp
How can I add the user's name after a successful authentication, and send it to Relying Party so that the openId url of the user looks like this:
http://localhost/myapp/openid.jsp?user=xxxxxx

Thanks.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2552
    
    2

I don't know of OpenID, but what you are trying to say can simply be done by appending the "?" and "user=xxxxx" strings to the URL right?


SCJP, SCWCD.
|Asking Good Questions|
malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69
Yes that is what I want to do.
But I am not been able to understand how can I do that.

The openId url is http://localhost/myapp/openid.jsp , and that same url is saved for every user on the Consumer site ( which I am also running on a local machine).

After authentication, I want to add ?user=xxxxxx at the end of openid url. Then this openId url will be transferred to Consumer's site.

Like how Google's or yahoo's openId works
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2552
    
    2

What do you mean by transferring of URL?
malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69
By transferring mean,
I enter http://localhost/myapp/openid.jsp as openid url at consumer's site. Like when using google I enter https://www.google.com/accounts/o8/id

But the google's url saved at consumer's site is like this https://www.google.com/accounts/o8/id?id=xxxxxxxxxxxxxxxxxx
Mine url for every user stays the same like http://localhost/myapp/openid.jsp
I would like to know a way by which I can add some parameter at the end of my openid url after authentication.
So that the URL saved at consumer's site looks like
http://localhost/myapp/openid.jsp?user=xxxxxx
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Add parameters to openId url
 
Similar Threads
OpenID-enabling your Web Application
[GoogleAPI] get user info
OpenId + OAuth hybrid protocol Implementation for google using java
How to use OpenID, specifically OpenID4Java library
How to authenticate a user using open Id after logging in the system