-
Notifications
You must be signed in to change notification settings - Fork 60
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
oauth config override #63
base: master
Are you sure you want to change the base?
oauth config override #63
Conversation
Add three new options for specifying client cert authentication: --tls_client_cert_path --tls_client_key_path --tls_client_override_authority Update instructions and generate new test certificates, including a client cert.
Add client cert support
Fix a few style nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looking nice, just a few style nits here and there
try { | ||
URL url = new URL(rawUrl); | ||
return Optional.of(url); | ||
} catch (MalformedURLException mURLE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/mURLE/e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure what this means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant that the standard naming convention is "e" rather than "mURLE".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok thanks, will do
URL url = new URL(rawUrl); | ||
return Optional.of(url); | ||
} catch (MalformedURLException mURLE) { | ||
throw new IllegalArgumentException("URL " + rawUrl +" is invalid", mURLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: missing space after +
@@ -131,6 +131,29 @@ private Configuration applyOverrides(Configuration configuration) { | |||
resultBuilder.getCallConfigBuilder().setTlsCaCertPath( | |||
overrides.get().tlsCaCertPath().get().toString()); | |||
} | |||
if (overrides.get().oauthRefreshTokenEndpointUrl().isPresent()) { | |||
resultBuilder.getCallConfigBuilder().getOauthConfigBuilder().getRefreshTokenCredentialsBuilder() | |||
.setTokenEndpointUrl(overrides.get().oauthRefreshTokenEndpointUrl().get().toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: indentation looks bad
when(mockOverrides.oauthAccessTokenPath()).thenReturn(Optional.empty()); | ||
|
||
Configuration config = ConfigurationLoader | ||
.forDefaultConfigSet() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent here as well
please fix throughout the pr
I've reformatted the tabs. Is there an automated way this could be done, maybe with a linter to check style? |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
.filter(config -> config.getName().equals(name)) | ||
.findAny() | ||
.orElseThrow(() -> new IllegalArgumentException("Could not find named config: " + name)); | ||
.filter(config -> config.getName().equals(name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: indentation still off
Digital Signature, Non Repudiation, Key Encipherment | ||
X509v3 Subject Key Identifier: | ||
E2:53:8F:A6:30:9A:43:C6:24:84:5A:FB:4D:8F:9D:5B:C8:24:28:F8 | ||
X509v3 Authority Key Identifier: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this diff is against an old version of head. Please rebase :)
…nto feature/oauth-config-override
Adding ability to override oauth configuration settings via command line arguments