mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-08 01:48:33 +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;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping(value={"/identity/api/org"})
|
@RequestMapping(value={"/im/api/Organization"})
|
||||||
public class RestOrganizationController {
|
public class RestOrganizationController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
|||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping(value={"/identity/api/userinfo"})
|
@RequestMapping(value={"/im/api/Users"})
|
||||||
public class RestUserInfoController {
|
public class RestUserInfoController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -66,6 +66,24 @@ public class RestUserInfoController {
|
|||||||
}
|
}
|
||||||
return userInfo;
|
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)
|
@RequestMapping(value = "/{id}", method = RequestMethod.PUT)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|||||||
@ -19,7 +19,7 @@ package org.maxkey.identity.scim.controller;
|
|||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
@RequestMapping(value = "/identity/scim/v2/Groups")
|
@RequestMapping(value = "/im/scim/v2/Groups")
|
||||||
public class ScimGroupController {
|
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
|
* http://tools.ietf.org/html/draft-ietf-scim-api-00#section-3
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/identity/scim/v2/Organization")
|
@RequestMapping(value = "/im/scim/v2/Organization")
|
||||||
public class ScimOrganizationController {
|
public class ScimOrganizationController {
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/identity/scim/v2/ServiceProviderConfig")
|
@RequestMapping(value = "/im/scim/v2/ServiceProviderConfig")
|
||||||
public class ScimServiceProviderConfigController {
|
public class ScimServiceProviderConfigController {
|
||||||
|
|
||||||
public static final int MAX_RESULTS = 100;
|
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
|
* http://tools.ietf.org/html/draft-ietf-scim-api-00#section-3
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/identity/scim/v2/Users")
|
@RequestMapping(value = "/im/scim/v2/Users")
|
||||||
public class ScimUserController {
|
public class ScimUserController {
|
||||||
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user