googleapis / googleapis/google-oauth-java-client
Revoke token via Java SDK
Open
type: feature request
- Dominant language
- Java
- Stars
- 661
- Forks
- 284
- PR merge metrics
- No merged PRs in 30d
Description
It is currently not possible to revoke a Google token using the Google Java SDK
See the documentation here:
https://developers.google.com/identity/protocols/OAuth2WebServer#tokenrevoke
There's no equivalent to the PHP `$client->revokeToken();` in Java. As far as I can tell, the only workaround is to create your own client for this API call.
This custom client then calls
```
curl -H "Content-type:application/x-www-form-urlencoded" \
https://accounts.google.com/o/oauth2/revoke?token={token}
```
As originally reported here:
https://github.com/googleapis/google-oauth-java-client/issues/20
Contributor guide
Assessment
This issue has not been assessed yet.