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

Please add a way to set the "state" parameter to AbstractAuthorizationCodeServlet #49

Closed
wonderfly opened this issue Jan 9, 2015 · 3 comments
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@wonderfly
Copy link
Contributor

From bbu...@google.com on August 21, 2012 11:06:24

Java environments (e.g. Java 6, Android 2.3, App Engine, or All)? All. Please describe the feature requested. Please allow a way to add the state parameter when using the AbstractAuthorizationCodeServlet, similar to GoogleAuthorizationCodeFlow.newAuthorizationUrl().setState("foo")

Thanks!
--brendan

Original issue: http://code.google.com/p/google-oauth-java-client/issues/detail?id=49

@wonderfly wonderfly added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. imported priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jan 9, 2015
@wonderfly wonderfly self-assigned this Jan 9, 2015
@wonderfly
Copy link
Contributor Author

From yan...@google.com on August 21, 2012 13:42:09

Possible solutions:

Add this to AbstractAuthorizationCodeServlet (deprecating getRedirectUri):

protected void process(AuthorizationCodeRequestUrl authorizationUrl) throws IOException {
}

So you can optionally provide your own implementation like:

@OverRide
protected void process(AuthorizationCodeRequestUrl authorizationUrl) {
authorizationUrl.setRedirectUri("...").setState("foo");
}

Alternatively, add this:

protected String getState(HttpServletRequest req) throws ServletException, IOException {
return null;
}

so you can override as follows:

@OverRide
protected String getState(HttpServletRequest req) {
return "foo";
}

Status: Accepted
Owner: yan...@google.com
Cc: rmis...@google.com
Labels: -Priority-Medium Priority-High Milestone-Version1.11.0 Component-OAuth2

@wonderfly
Copy link
Contributor Author

From yan...@google.com on August 23, 2012 08:05:12

http://codereview.appspot.com/6482051

Status: Started
Labels: -Priority-High Priority-Medium

@wonderfly
Copy link
Contributor Author

From yan...@google.com on August 27, 2012 06:02:10

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant