From d8d0298498f31c70aeac352180fe3660c5167209 Mon Sep 17 00:00:00 2001 From: Dane Barentine Date: Mon, 4 Jan 2016 11:30:57 -0800 Subject: [PATCH] KEYCLOAK-2255 Location header should return IdP alias instead of provider ID. --- .../services/resources/admin/IdentityProvidersResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java b/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java index bf452ff0f1..84bbdad573 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java @@ -170,7 +170,7 @@ public class IdentityProvidersResource { adminEvent.operation(OperationType.CREATE).resourcePath(uriInfo, identityProvider.getInternalId()) .representation(representation).success(); - return Response.created(uriInfo.getAbsolutePathBuilder().path(representation.getProviderId()).build()).build(); + return Response.created(uriInfo.getAbsolutePathBuilder().path(representation.getAlias()).build()).build(); } catch (ModelDuplicateException e) { return ErrorResponse.exists("Identity Provider " + representation.getAlias() + " already exists"); }