mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
SCIM Rest logs
This commit is contained in:
parent
07fa7a0402
commit
b9d13e69d0
@ -47,6 +47,7 @@ public class RestOrganizationController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
public Organizations getUser(@PathVariable String id,
|
||||
@RequestParam(required = false) String attributes) {
|
||||
_logger.debug("Organizations id {} , attributes {}", id , attributes);
|
||||
Organizations org = organizationsService.get(id);
|
||||
return org;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ public class RestUserInfoController {
|
||||
public UserInfo getUser(
|
||||
@PathVariable String id,
|
||||
@RequestParam(required = false) String attributes) {
|
||||
|
||||
_logger.debug("UserInfo id {} , attributes {}", id , attributes);
|
||||
UserInfo loadUserInfo = userInfoService.get(id);
|
||||
loadUserInfo.setDecipherable(null);
|
||||
return loadUserInfo;
|
||||
|
||||
@ -64,6 +64,7 @@ public class ScimGroupController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
public MappingJacksonValue get(@PathVariable String id,
|
||||
@RequestParam(required = false) String attributes) {
|
||||
_logger.debug("ScimGroup id {} , attributes {}", id , attributes);
|
||||
Roles role = rolesService.get(id);
|
||||
ScimGroup scimGroup = role2ScimGroup(role);
|
||||
List<UserInfo> userList = roleMemberService.queryMemberByRoleId(id);
|
||||
@ -81,6 +82,7 @@ public class ScimGroupController {
|
||||
public MappingJacksonValue create(@RequestBody ScimGroup scimGroup,
|
||||
@RequestParam(required = false) String attributes,
|
||||
UriComponentsBuilder builder) throws IOException {
|
||||
_logger.debug("ScimGroup content {} , attributes {}", scimGroup , attributes);
|
||||
Roles role =scimGroup2Role(scimGroup);
|
||||
rolesService.insert(role);
|
||||
return get(role.getId(),attributes);
|
||||
@ -91,6 +93,7 @@ public class ScimGroupController {
|
||||
@RequestBody ScimGroup scimGroup,
|
||||
@RequestParam(required = false) String attributes)
|
||||
throws IOException {
|
||||
_logger.debug("ScimGroup content {} , attributes {}", scimGroup , attributes);
|
||||
Roles role =scimGroup2Role(scimGroup);
|
||||
rolesService.update(role);
|
||||
return get(role.getId(),attributes);
|
||||
@ -99,6 +102,7 @@ public class ScimGroupController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public void delete(@PathVariable final String id) {
|
||||
_logger.debug("ScimGroup id {} " , id);
|
||||
rolesService.remove(id);
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,7 @@ public class ScimOrganizationController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
public MappingJacksonValue get(@PathVariable String id,
|
||||
@RequestParam(required = false) String attributes) {
|
||||
_logger.debug("ScimOrganization id {} , attributes {}", id , attributes);
|
||||
Organizations org = organizationsService.get(id);
|
||||
ScimOrganization scimOrg = org2ScimOrg(org);
|
||||
|
||||
@ -75,6 +76,7 @@ public class ScimOrganizationController {
|
||||
public MappingJacksonValue create(@RequestBody ScimOrganization scimOrg,
|
||||
@RequestParam(required = false) String attributes,
|
||||
UriComponentsBuilder builder) throws IOException {
|
||||
_logger.debug("ScimOrganization content {} , attributes {}", scimOrg , attributes);
|
||||
Organizations createOrg = scimOrg2Org(scimOrg);
|
||||
organizationsService.insert(createOrg);
|
||||
return get(createOrg.getId(), attributes);
|
||||
@ -84,6 +86,7 @@ public class ScimOrganizationController {
|
||||
public MappingJacksonValue replace(@PathVariable String id,
|
||||
@RequestBody ScimOrganization scimOrg,
|
||||
@RequestParam(required = false) String attributes)throws IOException {
|
||||
_logger.debug("ScimOrganization content {} , attributes {}", scimOrg , attributes);
|
||||
Organizations updateOrg = scimOrg2Org(scimOrg);
|
||||
organizationsService.update(updateOrg);
|
||||
return get(id, attributes);
|
||||
@ -92,6 +95,7 @@ public class ScimOrganizationController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public void delete(@PathVariable final String id) {
|
||||
_logger.debug("ScimOrganization id {}", id );
|
||||
organizationsService.remove(id);
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +77,7 @@ public class ScimUserController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
public MappingJacksonValue get(@PathVariable String id,
|
||||
@RequestParam(required = false) String attributes) {
|
||||
_logger.debug("ScimUser id {} , attributes {}", id , attributes);
|
||||
UserInfo userInfo = userInfoService.get(id);
|
||||
ScimUser scimUser = userInfo2ScimUser(userInfo);
|
||||
return new MappingJacksonValue(scimUser);
|
||||
@ -86,6 +87,7 @@ public class ScimUserController {
|
||||
public MappingJacksonValue create(@RequestBody ScimUser user,
|
||||
@RequestParam(required = false) String attributes,
|
||||
UriComponentsBuilder builder) throws IOException {
|
||||
_logger.debug("ScimUser {} , attributes {}", user , attributes);
|
||||
UserInfo userInfo = scimUser2UserInfo(user);
|
||||
userInfoService.insert(userInfo);
|
||||
return get(userInfo.getId(),attributes);
|
||||
@ -96,6 +98,7 @@ public class ScimUserController {
|
||||
@RequestBody ScimUser user,
|
||||
@RequestParam(required = false) String attributes)
|
||||
throws IOException {
|
||||
_logger.debug("ScimUser {} , attributes {}", user , attributes);
|
||||
UserInfo userInfo = scimUser2UserInfo(user);
|
||||
userInfoService.update(userInfo);
|
||||
return get(id,attributes);
|
||||
@ -104,6 +107,7 @@ public class ScimUserController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public void delete(@PathVariable final String id) {
|
||||
_logger.debug("ScimUser id {} ", id );
|
||||
userInfoService.remove(id);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user