This commit is contained in:
MaxKey 2021-02-26 18:09:13 +08:00
parent c888cec376
commit d00421ccfd
6 changed files with 24 additions and 6 deletions

View File

@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.util.UriComponentsBuilder;
@Controller
@RequestMapping(value={"/identity/api/org"})
@RequestMapping(value={"/im/api/Organization"})
public class RestOrganizationController {
@Autowired

View File

@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.util.UriComponentsBuilder;
@Controller
@RequestMapping(value={"/identity/api/userinfo"})
@RequestMapping(value={"/im/api/Users"})
public class RestUserInfoController {
@Autowired
@ -66,6 +66,24 @@ public class RestUserInfoController {
}
return userInfo;
}
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
public String changePassword(
@RequestParam(required = true) String username,
@RequestParam(required = true) String password,
UriComponentsBuilder builder) throws IOException {
UserInfo loadUserInfo = userInfoService.loadByUsername(username);
if(loadUserInfo != null) {
UserInfo changePassword = new UserInfo();
changePassword.setId(loadUserInfo.getId());
changePassword.setUsername(username);
changePassword.setPassword(password);
changePassword.setDecipherable(loadUserInfo.getDecipherable());
userInfoService.changePassword(changePassword);
}
return "true";
}
@RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ResponseBody

View File

@ -19,7 +19,7 @@ package org.maxkey.identity.scim.controller;
import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping(value = "/identity/scim/v2/Groups")
@RequestMapping(value = "/im/scim/v2/Groups")
public class ScimGroupController {
}

View File

@ -45,7 +45,7 @@ import org.springframework.web.util.UriComponentsBuilder;
* http://tools.ietf.org/html/draft-ietf-scim-api-00#section-3
*/
@RestController
@RequestMapping(value = "/identity/scim/v2/Organization")
@RequestMapping(value = "/im/scim/v2/Organization")
public class ScimOrganizationController {
@RequestMapping(value = "/{id}", method = RequestMethod.GET)

View File

@ -26,7 +26,7 @@ import java.util.HashSet;
import java.util.Set;
@RestController
@RequestMapping(value = "/identity/scim/v2/ServiceProviderConfig")
@RequestMapping(value = "/im/scim/v2/ServiceProviderConfig")
public class ScimServiceProviderConfigController {
public static final int MAX_RESULTS = 100;

View File

@ -44,7 +44,7 @@ import org.springframework.web.util.UriComponentsBuilder;
* http://tools.ietf.org/html/draft-ietf-scim-api-00#section-3
*/
@RestController
@RequestMapping(value = "/identity/scim/v2/Users")
@RequestMapping(value = "/im/scim/v2/Users")
public class ScimUserController {
@RequestMapping(value = "/{id}", method = RequestMethod.GET)