mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 17:38:32 +08:00
api
This commit is contained in:
parent
c888cec376
commit
d00421ccfd
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user