File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to get AuthSubSessionToken Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get AuthSubSessionToken " Watch "How to get AuthSubSessionToken " New topic
Author

How to get AuthSubSessionToken

Praveen Sangolli
Greenhorn

Joined: May 22, 2008
Posts: 28
Hi everyone,

I am trying to get the AuthSubSessionToken in my servlet, I was successful in getting the token by sending this request

https://www.google.com/accounts/AuthSubRequest?scope=Fm8%2Ffeeds%2F&session=1&secure=0&next=htome.html

but this is a single-use AuthSub token.

I want to exchange this token to get the AuthSub session token for multiple requests.
Can anyone tel me how can i achieve that and if anyone could paste some sample code on how to go about it, I would really appreciate it..

Any help is appreciated

Thanks in advance
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Praveen,
According to Google's documentation, you need to get a request token first. Then you can make another request to upgrade it to a session token.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Praveen Sangolli
Greenhorn

Joined: May 22, 2008
Posts: 28
Hi Jeanne ,

As you said ,I have got the first token . Issue is that I am not able to exchange this token with the session token..
Praveen Sangolli
Greenhorn

Joined: May 22, 2008
Posts: 28
When i am trying to exchange it for a session token i am getting this exception

com.google.gdata.util.AuthenticationException: 403: Invalid AuthSub token.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to get AuthSubSessionToken
 
Similar Threads
https://my_secure_server
[GoogleAPI] get user info
Famous Java Applications
javax.net.ssl.SSLException: error while writing to socket
how can i make the session id more secure