mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-25 16:42:34 +00:00
fix cli output token can not return token
This commit is contained in:
@@ -385,8 +385,7 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd {
|
||||
}
|
||||
|
||||
if (outputResult) {
|
||||
|
||||
if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null)) {
|
||||
if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null) && isGetByID(url)) {
|
||||
// get object for id
|
||||
headers = new Headers();
|
||||
if (auth != null) {
|
||||
@@ -447,4 +446,8 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd {
|
||||
private boolean isCreateOrUpdate() {
|
||||
return "post".equals(httpVerb) || "put".equals(httpVerb);
|
||||
}
|
||||
|
||||
private boolean isGetByID(String url) {
|
||||
return !"clients-initial-access".equals(url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user