mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
fix cli output token can not return token
This commit is contained in:
parent
f557b2c88c
commit
c38fadcdec
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user