Skip to content

Commit

Permalink
fix(config-api): scim user management endpoint failing due to conflic…
Browse files Browse the repository at this point in the history
…t with user mgmt path (#1181)
  • Loading branch information
pujavs committed Apr 8, 2022
1 parent dfa19f0 commit 8ee47a0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
7 changes: 4 additions & 3 deletions jans-cli/cli/jca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2585,7 +2585,8 @@ paths:
security:
- oauth2: [https://jans.io/oauth/config/user.write]

/jans-config-api/scim/user:

/jans-config-api/scim/resource/user:
get:
tags:
- SCIM - User Management
Expand Down Expand Up @@ -2735,7 +2736,7 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/jans-config-api/scim/user/{id}:
/jans-config-api/scim/resource/user/{id}:
get:
tags:
- SCIM - User Management
Expand Down Expand Up @@ -2986,7 +2987,7 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/jans-config-api/scim/user/.search:
/jans-config-api/scim/resource/user/.search:
post:
tags:
- SCIM - User Management
Expand Down
6 changes: 3 additions & 3 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2555,7 +2555,7 @@ paths:
- oauth2: [https://jans.io/oauth/config/user.delete]


/jans-config-api/scim/user:
/jans-config-api/scim/resource/user:
get:
tags:
- SCIM - User Management
Expand Down Expand Up @@ -2705,7 +2705,7 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/jans-config-api/scim/user/{id}:
/jans-config-api/scim/resource/user/{id}:
get:
tags:
- SCIM - User Management
Expand Down Expand Up @@ -2956,7 +2956,7 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/jans-config-api/scim/user/.search:
/jans-config-api/scim/resource/user/.search:
post:
tags:
- SCIM - User Management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/user")
@Path("/resource/user")
public class ScimResource {

public static final String SEARCH_SUFFIX = ".search";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function() {
accessToken: '123',

//scim
scim_user_url: baseUrl + '/jans-config-api/scim/user',
scim_user_url: baseUrl + '/jans-config-api/scim/resource/user',
scim_config_url: baseUrl + '/jans-config-api/scim/config',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function() {


//scim
scim_user_url: baseUrl + '/jans-config-api/scim/user',
scim_user_url: baseUrl + '/jans-config-api/scim/resource/user',
scim_config_url: baseUrl + '/jans-config-api/scim/config',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
]
},
{
"path":"/jans-config-api/scim/user",
"path":"/jans-config-api/scim/resource/user",
"conditions":[
{
"httpMethods":["GET"],
Expand All @@ -612,7 +612,7 @@
]
},
{
"path":"/jans-config-api/scim/user/{id}",
"path":"/jans-config-api/scim/resource/user/{id}",
"conditions":[
{
"httpMethods":["GET"],
Expand Down Expand Up @@ -646,7 +646,7 @@
]
},
{
"path":"/jans-config-api/scim/user/.search",
"path":"/jans-config-api/scim/resource/user/.search",
"conditions":[
{
"httpMethods":["GET"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ public String getDisplayValue() {
return values.get(0).toString();
}

StringBuilder sb = new StringBuilder(values.get(0).toString());
for (int i = 1; i < values.size(); i++) {
sb.append(", ").append(values.get(i).toString());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < values.size(); i++) {
if (i > 0) {
sb.append(", ");
}
sb.append(values.get(i).toString());
}

return sb.toString();
Expand Down

0 comments on commit 8ee47a0

Please sign in to comment.