Merge pull request #1972 from dbarentine/master

KEYCLOAK-2255 Location header should return IdP alias instead of prov…
This commit is contained in:
Bill Burke 2016-01-04 17:18:42 -05:00
commit 49c15f200e

View file

@ -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");
}