Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ private static JwtAuthentication jwtAuthentication(JwtConfig jwtConfig, JsonMapp
jwtCredential.getClientId(),
jwtCredential.getClientSecret(),
jwtCredential.getAudience(),
URI.create(jwtCredential.getAuthUrl()).toURL());
URI.create(jwtCredential.getAuthUrl()).toURL(),
null);
} catch (MalformedURLException e) {
throw new RuntimeException("Error while mapping jwt credential", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private HttpPost buildRequest() throws URISyntaxException {
formParams.add(new BasicNameValuePair("client_id", jwtCredential.clientId()));
formParams.add(new BasicNameValuePair("client_secret", jwtCredential.clientSecret()));
formParams.add(new BasicNameValuePair("audience", jwtCredential.audience()));
formParams.add(new BasicNameValuePair("scope", jwtCredential.scope()));
httpPost.setEntity(new UrlEncodedFormEntity(formParams));
return httpPost;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

import java.net.URL;

public record JwtCredential(String clientId, String clientSecret, String audience, URL authUrl) {}
public record JwtCredential(
String clientId, String clientSecret, String audience, URL authUrl, String scope) {}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public Authentication authentication() {
properties.clientId(),
properties.clientSecret(),
properties.audience(),
properties.authUrl()),
properties.authUrl(),
properties.scope()),
new JacksonTokenResponseMapper(objectMapper));
}
default -> throw new IllegalStateException("Unsupported profile: " + properties.profile());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public record OperateClientConfigurationProperties(
String clientSecret,
URL authUrl,
String audience,
String scope,
// saas auth properies
String region,
String clusterId) {
Expand Down