Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use OAuth within my GWT application?

How do I use OAuth within my Java GWT application? In particular, I want to get a list of users in my Google Aps domain, using this API:

http://code.google.com/googleapps/domain/profiles/developers_guide_protocol.html

I know this sounds like a question, that probably has been asked many times before, but I couldn't find any Java code on how to realize the OAuth steps described in the API above.

I would be glad if someone could share some code, or point me to the right docs.

like image 832
JochenJung Avatar asked Oct 19 '10 09:10

JochenJung


People also ask

How do I enable OAuth?

Go to the Google API Console OAuth consent screen page. Add required information like a product name and support email address. Click Add Scope. On the dialog that appears, select the scopes your project uses.

How does OAuth work in REST API?

OAuth is an authorization framework that enables an application or service to obtain limited access to a protected HTTP resource. To use REST APIs with OAuth in Oracle Integration, you need to register your Oracle Integration instance as a trusted application in Oracle Identity Cloud Service.


1 Answers

This tutorial by Matt Raible is easily the best one I've seen so far on OAuth and gwt. He also has a very good picture depicting the authentication flow, which I always find help. However, as Matt himself says, the solution is not 100% reliable, but it might still get you part of the way.

With this in mind, it might be better to just go with a pure javascript implementation of it. You'll find one such implementation right here. This SO thread might come in handy to you if you chose that path.

Best of luck to you.

like image 180
Mia Clarke Avatar answered Sep 19 '22 12:09

Mia Clarke