diff --git a/jans-scim/server/src/main/java/io/jans/scim/ws/rs/scim2/UserWebService.java b/jans-scim/server/src/main/java/io/jans/scim/ws/rs/scim2/UserWebService.java index 7dc02089020..50e8e4ec20f 100644 --- a/jans-scim/server/src/main/java/io/jans/scim/ws/rs/scim2/UserWebService.java +++ b/jans-scim/server/src/main/java/io/jans/scim/ws/rs/scim2/UserWebService.java @@ -149,6 +149,8 @@ public Response createUser( log.debug("Executing web service method. createUser"); executeValidation(user); + if (StringUtils.isEmpty(user.getUserName())) throw new SCIMException("Empty username not allowed"); + checkUidExistence(user.getUserName()); assignMetaInformation(user); ScimResourceUtil.adjustPrimarySubAttributes(user); diff --git a/jans-scim/server/src/main/resources/jans-scim-openapi.yaml b/jans-scim/server/src/main/resources/jans-scim-openapi.yaml index 18b5e5b6fcc..f81d711ea5c 100644 --- a/jans-scim/server/src/main/resources/jans-scim-openapi.yaml +++ b/jans-scim/server/src/main/resources/jans-scim-openapi.yaml @@ -1805,6 +1805,27 @@ components: type: string description: A detailed human-readable message of the error description: See section 3.12 of RFC 7644 + AuthenticationScheme: + required: + - type + - name + - description + type: object + properties: + type: + type: string + example: oauth2 + name: + type: string + description: + type: string + specUri: + type: string + documentationUri: + type: string + primary: + type: boolean + description: See section 5 of RFC 7643 ServiceProviderConfigResponse: type: object properties: @@ -1859,21 +1880,9 @@ components: supported: type: boolean authenticationSchemes: - type: object - properties: - type: - type: string - example: oauth2 - name: - type: string - description: - type: string - specUri: - type: string - documentationUri: - type: string - primary: - type: boolean + type: array + items: + $ref: '#/components/schemas/AuthenticationScheme' description: See section 5 of RFC 7643 ResourceType: type: object diff --git a/jans-scim/server/src/main/resources/jans-scim-swagger.yaml b/jans-scim/server/src/main/resources/jans-scim-swagger.yaml index 635496e0a3a..f602c3b3989 100644 --- a/jans-scim/server/src/main/resources/jans-scim-swagger.yaml +++ b/jans-scim/server/src/main/resources/jans-scim-swagger.yaml @@ -1455,6 +1455,27 @@ definitions: detail: type: string description: A detailed human-readable message of the error + AuthenticationScheme: + description: See section 5 of RFC 7643 + type: object + required: + - type + - name + - description + properties: + type: + type: string + example: oauth2 + name: + type: string + description: + type: string + specUri: + type: string + documentationUri: + type: string + primary: + type: boolean ServiceProviderConfigResponse: description: See section 5 of RFC 7643 type: object @@ -1510,20 +1531,9 @@ definitions: supported: type: boolean authenticationSchemes: - properties: - type: - type: string - example: oauth2 - name: - type: string - description: - type: string - specUri: - type: string - documentationUri: - type: string - primary: - type: boolean + type: array + items: + $ref: "#/definitions/AuthenticationScheme" ResourceType: description: See section 6 of RFC 7643 type: object