|
|
@@ -161,11 +161,14 @@ public class KeycloakController {
|
|
|
return keycloakService.queryUserCredentials(userId);
|
|
|
}
|
|
|
|
|
|
+ @DeleteMapping("/admin/users/{userId}/credentials/{credentialId}")
|
|
|
+ public Response removeUserCredentials(@PathVariable("userId")String userId,
|
|
|
+ @PathVariable("credentialId")String credentialId){
|
|
|
+ return keycloakService.removeUserCredentials(userId ,credentialId);
|
|
|
+ }
|
|
|
+
|
|
|
@PutMapping("/keycloak/users/attribute")
|
|
|
public Response updateUserAttribute(@RequestHeader String userId , @RequestBody UserRepresentation representation){
|
|
|
- if(CollectionUtils.isEmpty(representation.getAttributes())){
|
|
|
- return Response.buildFailure("500","用户属性不能为空!");
|
|
|
- }
|
|
|
return keycloakService.updateUser(userId , representation ,Constant.RESET_ATTRBUTE);
|
|
|
}
|
|
|
|