I am creating an application in Google App Engine java. In this application I have to authenticate the users using OAuth2. These users belongs to other Service provider lets say example.com(means they have their account on example.com). I checked the Google App Engine documentation about Authentication and Authorization through OAuth. In this documentation they just provide the way to authenticate and authorize the google users not the other domains user. I have also checked the OpenID functionality in google app engine but I don't need this because example.com don't provide OpenID endpoints to authenticate user. please help me to derive a solution to authenticate the user.
Asked
Active
Viewed 1,182 times
1
-
What about UserService.createLoginURL() isn't working? https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/UserService#createLoginURL(java.lang.String,java.lang.String,java.lang.String,java.util.Set) – Michael Aaron Safyan Feb 16 '14 at 18:14
-
I think this will redirect the user to gmail login page... right? – Waqas Ali Feb 16 '14 at 18:15
-
createLoginURL() allows you to specify a variety of different providers. There is an example at the following link that shows how to use it to create login buttons for a variety of third party services: https://developers.google.com/appengine/articles/openid – Michael Aaron Safyan Feb 16 '14 at 18:18
-
I have already read about opendId and also implemented it. OpenId only work for those service provider(Identity Provider) who has implemented the like yahoo etc. – Waqas Ali Feb 16 '14 at 18:22
-
OpenID is the standard way to do things. If you are looking for Facebook, specifically, this question answers it: http://stackoverflow.com/questions/9566988/java-example-how-to-login-with-facebook-account-on-gae-using-oauth/9580644#9580644 – Michael Aaron Safyan Feb 16 '14 at 18:25
-
what about twitter? I think they are also support OAuth not OpenId. – Waqas Ali Feb 16 '14 at 18:28
-
If you use something non-standard, then you have to do a custom implementation for each one. Fortunately, you can often borrow from the work of other people for things that are commonly sought after: https://github.com/baus/App-Engine-Sign-In-With-Twitter – Michael Aaron Safyan Feb 16 '14 at 18:32
-
what about google-oaut-java-client library? can we use to perform OAuth authentication? My issue is that the service provider from which I have to authenticate provide the OAuth Endpoints for user authentication. I don't know either OpenID will fit on it. – Waqas Ali Feb 16 '14 at 18:39
1 Answers
2
I solve this problem by myself. I use Google OAuth Client Library for Java. This library can handle OAuth 1.0 and OAuth2.0 communication.

Waqas Ali
- 1,642
- 4
- 32
- 55