Skip to content
Draft
Changes from 1 commit
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 @@ -180,19 +180,7 @@ public Future<JsonObject> token(String grantType, JsonObject params) {

form.put("grant_type", grantType);

if (!clientAuthentication(headers, form)) {
String clientId = config.getClientId();
if (clientId == null) {
if (config.getClientAssertionType() != null) {
form
.put("client_assertion_type", config.getClientAssertionType());
}
if (config.getClientAssertion() != null) {
form
.put("client_assertion", config.getClientAssertion());
}
}
}
clientAuthentication(headers, form);

headers.put("Content-Type", "application/x-www-form-urlencoded");
final Buffer payload = SimpleHttpClient.jsonToQuery(form);
Expand Down Expand Up @@ -428,6 +416,14 @@ private boolean clientAuthentication(JsonObject headers, JsonObject form) {
if (config.getClientId() != null) {
form.put("client_id", config.getClientId());
}
if (config.getClientAssertionType() != null) {
form
.put("client_assertion_type", config.getClientAssertionType());
}
if (config.getClientAssertion() != null) {
form
.put("client_assertion", config.getClientAssertion());
}
}

return confidentialClient;
Expand Down
Loading