| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This sample demonstrates using the Oauth2 apis to create an authenticaion filter.
See the Google App Engine standard environment documentation for more detailed instructions.
NOTE: The app can be run locally, but the Oauth2 APIs do not work with the development server.
$ mvn appengine:devserver
$ mvn appengine:update -Dappengine.appId=YOUR-PROJECT-ID -Dappengine.version=SOME-VERSION
Using your browser, visit https://YOUR-PROJECT-ID.appspot.com, click Sign In.
The Sign In process will then request some text from your app, and then display it, if the id matches the list in src/main/java/com/example/appengine/Oauth2Filter.java.
NOTE: Typically, you would use this for Service Accounts, but user accounts work as well.
Enable logging by uncommenting the context.log line in src/main/java/com/example/appengine/Oauth2Filter.java, redeploy, and visit the page
Look at the logs in Cloud Developers Console > Logs.
Add the tokenAudience to the allowedClients.
Deploy and visit the page again.
| Back | FazBrowse Home | New Git URL |