Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for local web server auth flow #88

Closed
chanseokoh opened this issue Feb 1, 2017 · 1 comment
Closed

Add support for local web server auth flow #88

chanseokoh opened this issue Feb 1, 2017 · 1 comment
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@chanseokoh
Copy link
Contributor

chanseokoh commented Feb 1, 2017

Something like LocalServerReceiver in google-oauth-client.

@garrettjonesgoogle garrettjonesgoogle changed the title FR: support for local web server auth flow Add support for local web server auth flow Mar 10, 2017
@JustinBeckwith JustinBeckwith added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jun 8, 2018
@chingor13 chingor13 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jun 19, 2018
@JustinBeckwith JustinBeckwith removed triage me I really want to be triaged. enhancement 🚨 This issue needs some love. labels Jun 19, 2018
@chingor13
Copy link
Contributor

This is outside the scope of this repository. The implementation(s) in google-oauth-client integrate with several Java frameworks and will work with any OAuth2 implementation (not just Google's).

Once you receive your credentials from the OAuth flow, you can instantiate a Credentials implementation here:

// import com.google.auth.Credentials;
// import com.google.auth.oauth2.AccessToken;
// import com.google.auth.oauth2.OAuth2Credentials;

AccessToken accessToken = new AccessToken(
    "your-access-token-from-auth-flow", expirationFromAuthFlow);
Credentials credentials = OAuth2Credentials.create(accessToken);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants