I want to access google AuditService api from google app engine application.user is already logged in to my app using UserService via google credentials.
Is there a way I can make authenticated calls without the need of user re authenticating my app.
AuditService service = new AuditService("userEmail", "password", "domain name", "application name");
in the above call I don’t have userEmail and password,but I have the user object which I got using UserService ,when user first logged in to my application.Any way to use this user object to make authenticated calls ?
It looks like you can do this by storing and providing an authentication token instead of the user’s credentials. On the first request, proceed with the username/password authentication as normal, then generate an authorization token using service.getAuthToken(…). Store that token with your user model. For subsequent requests, instead of using the AuditService constructor that takes the user’s credentials, use the one that omits them: AuditService(domain, applicationName). Once constructed, call service.setUserToken(token) to provide the stored token. You should then be able to make authenticated requests. Be sure to handle AuthenticationExceptions that will be raised by invalid/expired tokens.