Update URL builder
Fixes: keycloak/keycloak-quickstarts#548 Signed-off-by: Hynek Mlnarik <hmlnarik@redhat.com>
This commit is contained in:
parent
eb2936f655
commit
9d1433d266
1 changed files with 9 additions and 5 deletions
|
@ -30,6 +30,7 @@ import org.keycloak.services.resources.RealmsResource;
|
||||||
import org.keycloak.services.resources.ThemeResource;
|
import org.keycloak.services.resources.ThemeResource;
|
||||||
import org.keycloak.services.resources.admin.AdminRoot;
|
import org.keycloak.services.resources.admin.AdminRoot;
|
||||||
|
|
||||||
|
import org.keycloak.utils.StringUtil;
|
||||||
import jakarta.ws.rs.core.UriBuilder;
|
import jakarta.ws.rs.core.UriBuilder;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
|
@ -130,11 +131,14 @@ public class Urls {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static UriBuilder actionTokenBuilder(URI baseUri, String tokenString, String clientId, String tabId, String clientData) {
|
public static UriBuilder actionTokenBuilder(URI baseUri, String tokenString, String clientId, String tabId, String clientData) {
|
||||||
return loginActionsBase(baseUri).path(LoginActionsService.class, "executeActionToken")
|
UriBuilder res = loginActionsBase(baseUri).path(LoginActionsService.class, "executeActionToken")
|
||||||
.queryParam(Constants.KEY, tokenString)
|
.queryParam(Constants.KEY, tokenString)
|
||||||
.queryParam(Constants.CLIENT_ID, clientId)
|
.queryParam(Constants.CLIENT_ID, clientId)
|
||||||
.queryParam(Constants.TAB_ID, tabId)
|
.queryParam(Constants.TAB_ID, tabId);
|
||||||
.queryParam(Constants.CLIENT_DATA, clientData);
|
if (StringUtil.isNotBlank(clientData)) {
|
||||||
|
res = res.queryParam(Constants.CLIENT_DATA, clientData);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue