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 USER_AGENT header to OAuthHandler requests #15733

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Awk34
Copy link
Contributor

@Awk34 Awk34 commented Nov 13, 2024

No description provided.

@Awk34
Copy link
Contributor Author

Awk34 commented Nov 13, 2024

Branch based off of #15729

@itsankit-google itsankit-google added the build Triggers github actions build label Nov 19, 2024
Copy link
Member

@itsankit-google itsankit-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are compilation failures in the build. Can you please build the module locally and fix the issues?

mvn clean install -DskipTests should work.


public PutOAuthProviderRequest(String loginURL, String tokenRefreshURL, String clientId, String clientSecret) {
public PutOAuthProviderRequest(String loginURL, String tokenRefreshURL, String clientId, String clientSecret, OAuthProviderRequest.CredentialEncodingStrategy strategy) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkstyle NIT : limit to 80 chars length.

} catch (MalformedURLException e) {
throw new OAuthServiceException(HttpURLConnection.HTTP_INTERNAL_ERROR, "Malformed URL", e);
}
}

private String getBasicAuthHeader(OAuthClientCredentials clientCreds) {
return String.format("Basic %s", Base64.getEncoder().encode(String.format("%s:%s", clientCreds.getClientId(), clientCreds.getClientSecret()).getBytes()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkstyle NIT : limit to 80 chars length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Triggers github actions build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants