How do I use OAuth within my GWT application?

后端 未结 3 1533
北恋
北恋 2020-12-10 04:14

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/googl

3条回答
  •  渐次进展
    2020-12-10 04:39

    For integrating OAuth and GWT, you should start with Scribe which handles the implementation of the OAuth:

    https://github.com/fernandezpablo85/scribe-java

    Next, you need to create a GWT widget that can handle the user's interactions to acquire permission to access their account. Then grab the response token, and make the API requests to the external site.

    No point re-implementing OAuth when scribe already does it for you - you just need to. I'd probably aim to use a GWT Popup for doing the authentication:

    http://gwt.google.com/samples/Showcase/Showcase.html#!CwBasicPopup

提交回复
热议问题