feat: Support additional request parameters for 3LO#1070
feat: Support additional request parameters for 3LO#1070kondo19 wants to merge 6 commits intogoogleapis:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
91bc925 to
5c24548
Compare
| ); | ||
| } | ||
|
|
||
| public AuthorizationCodeFlow( |
There was a problem hiding this comment.
lets remove this overloaded method. If someone really wants to pass additional parameters, they can create builder, set additionalparam and call build() on the builder. Exactly like what we have done in the test.
There was a problem hiding this comment.
Yes I see. I have removed overloaded method.
There was a problem hiding this comment.
Lets remove this overloaded method
| clientId = Preconditions.checkNotNull(builder.clientId); | ||
| authorizationServerEncodedUrl = | ||
| Preconditions.checkNotNull(builder.authorizationServerEncodedUrl); | ||
| additionalParameters = Preconditions.checkNotNull(builder.additionalParameters); |
There was a problem hiding this comment.
no need of null check here because it is an optional thing. You are checking for null before using it.
There was a problem hiding this comment.
Ah! Removed precondition check.
| setClientAuthentication(clientAuthentication); | ||
| setClientId(clientId); | ||
| setAuthorizationServerEncodedUrl(authorizationServerEncodedUrl); | ||
| setAdditionalParameters(Collections.<String, String>emptyMap()); |
There was a problem hiding this comment.
It is ok to just leave additional params as null. No need to set as empty map. It is ok to have it as well, no harm.
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Outdated
Show resolved
Hide resolved
...-client/src/test/java/com/google/api/client/auth/oauth2/AuthorizationCodeRequestUrlTest.java
Outdated
Show resolved
Hide resolved
|
Run |
|
Successfully ran command "mvn com.coveo:fmt-maven-plugin:format" on repo. Not sure how to clear up the missing CLA. |
This could happen if you contributed to this PR using different emails from different PCs. |
Introduce a way to pass additional parameters to auhtorization url
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.