mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00
[AC-1438] Updated SCIM controllers to respond with "content-Type: application/scim+json" (#3072)
This commit is contained in:
parent
6e58936fa3
commit
4a110ad135
@ -12,6 +12,7 @@ namespace Bit.Scim.Controllers.v2;
|
||||
|
||||
[Authorize("Scim")]
|
||||
[Route("v2/{organizationId}/groups")]
|
||||
[Produces("application/scim+json")]
|
||||
[ExceptionHandlerFilter]
|
||||
public class GroupsController : Controller
|
||||
{
|
||||
|
@ -13,6 +13,7 @@ namespace Bit.Scim.Controllers.v2;
|
||||
|
||||
[Authorize("Scim")]
|
||||
[Route("v2/{organizationId}/users")]
|
||||
[Produces("application/scim+json")]
|
||||
[ExceptionHandlerFilter]
|
||||
public class UsersController : Controller
|
||||
{
|
||||
|
@ -48,6 +48,8 @@ public class GroupsControllerTests : IClassFixture<ScimApplicationFactory>, IAsy
|
||||
|
||||
var responseModel = JsonSerializer.Deserialize<ScimGroupResponseModel>(context.Response.Body, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
|
||||
AssertHelper.AssertPropertyEqual(expectedResponse, responseModel);
|
||||
|
||||
Assert.Contains("application/scim+json", context.Response.Headers.ContentType.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -55,6 +55,8 @@ public class UsersControllerTests : IClassFixture<ScimApplicationFactory>, IAsyn
|
||||
|
||||
var responseModel = JsonSerializer.Deserialize<ScimUserResponseModel>(context.Response.Body, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
|
||||
AssertHelper.AssertPropertyEqual(expectedResponse, responseModel);
|
||||
|
||||
Assert.Contains("application/scim+json", context.Response.Headers.ContentType.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
Loading…
x
Reference in New Issue
Block a user