auth is already part of the serverBaseUri (#4418)
This commit is contained in:
parent
30ea556a7a
commit
e173bf33ba
2 changed files with 4 additions and 4 deletions
|
@ -43,9 +43,9 @@ public class DockerRegistryConfigFileInstallationProvider implements ClientInsta
|
||||||
public Response generateInstallation(final KeycloakSession session, final RealmModel realm, final ClientModel client, final URI serverBaseUri) {
|
public Response generateInstallation(final KeycloakSession session, final RealmModel realm, final ClientModel client, final URI serverBaseUri) {
|
||||||
final StringBuilder responseString = new StringBuilder("auth:\n")
|
final StringBuilder responseString = new StringBuilder("auth:\n")
|
||||||
.append(" token:\n")
|
.append(" token:\n")
|
||||||
.append(" realm: ").append(serverBaseUri).append("/auth/realms/").append(realm.getName()).append("/protocol/").append(DockerAuthV2Protocol.LOGIN_PROTOCOL).append("/auth\n")
|
.append(" realm: ").append(serverBaseUri).append("/realms/").append(realm.getName()).append("/protocol/").append(DockerAuthV2Protocol.LOGIN_PROTOCOL).append("/auth\n")
|
||||||
.append(" service: ").append(client.getClientId()).append("\n")
|
.append(" service: ").append(client.getClientId()).append("\n")
|
||||||
.append(" issuer: ").append(serverBaseUri).append("/auth/realms/").append(realm.getName()).append("\n");
|
.append(" issuer: ").append(serverBaseUri).append("/realms/").append(realm.getName()).append("\n");
|
||||||
return Response.ok(responseString.toString(), MediaType.TEXT_PLAIN_TYPE).build();
|
return Response.ok(responseString.toString(), MediaType.TEXT_PLAIN_TYPE).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,9 @@ public class DockerVariableOverrideInstallationProvider implements ClientInstall
|
||||||
@Override
|
@Override
|
||||||
public Response generateInstallation(final KeycloakSession session, final RealmModel realm, final ClientModel client, final URI serverBaseUri) {
|
public Response generateInstallation(final KeycloakSession session, final RealmModel realm, final ClientModel client, final URI serverBaseUri) {
|
||||||
final StringBuilder builder = new StringBuilder()
|
final StringBuilder builder = new StringBuilder()
|
||||||
.append("-e REGISTRY_AUTH_TOKEN_REALM=").append(serverBaseUri).append("/auth/realms/").append(realm.getName()).append("/protocol/").append(DockerAuthV2Protocol.LOGIN_PROTOCOL).append("/auth \\\n")
|
.append("-e REGISTRY_AUTH_TOKEN_REALM=").append(serverBaseUri).append("/realms/").append(realm.getName()).append("/protocol/").append(DockerAuthV2Protocol.LOGIN_PROTOCOL).append("/auth \\\n")
|
||||||
.append("-e REGISTRY_AUTH_TOKEN_SERVICE=").append(client.getClientId()).append(" \\\n")
|
.append("-e REGISTRY_AUTH_TOKEN_SERVICE=").append(client.getClientId()).append(" \\\n")
|
||||||
.append("-e REGISTRY_AUTH_TOKEN_ISSUER=").append(serverBaseUri).append("/auth/realms/").append(realm.getName()).append(" \\\n");
|
.append("-e REGISTRY_AUTH_TOKEN_ISSUER=").append(serverBaseUri).append("/realms/").append(realm.getName()).append(" \\\n");
|
||||||
return Response.ok(builder.toString(), MediaType.TEXT_PLAIN_TYPE).build();
|
return Response.ok(builder.toString(), MediaType.TEXT_PLAIN_TYPE).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue