Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: scim user management endpoint failing due to conflict with user … #1181

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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