Skip to content

Commit

Permalink
Merge pull request #15866 from Awk34/awk34-patch-5
Browse files Browse the repository at this point in the history
[CDAP-21115] Fix method used to base64 encode basic auth header
  • Loading branch information
itsankit-google authored Feb 10, 2025
2 parents 6dda8a0 + 8034fb4 commit ab57ae0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ private HttpRequest createGetAccessTokenRequest(OAuthProvider provider, String r

private String getBasicAuthHeader(OAuthClientCredentials clientCreds) {
String authInfo = String.format("%s:%s", clientCreds.getClientId(), clientCreds.getClientSecret());
return String.format("Basic %s", Base64.getEncoder().encode(authInfo.getBytes()));
return String.format("Basic %s", Base64.getEncoder().encodeToString(authInfo.getBytes()));
}

private OAuthProvider getProvider(String provider) throws OAuthServiceException {
Expand Down

0 comments on commit ab57ae0

Please sign in to comment.