Class ThirdPartAppMemberHttpEndpoint
java.lang.Object
io.github.xezzon.zeroweb.third_party_app.authn.ThirdPartAppMemberHttpEndpoint
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionThirdPartAppMemberHttpEndpoint
(ThirdPartyAppMemberService thirdPartyAppMemberService, ThirdPartyAppPermissionManager thirdPartyAppPermissionManager) -
Method Summary
Modifier and TypeMethodDescriptionio.github.xezzon.zeroweb.common.domain.Id
acceptInvitation
(String token) 持邀请码加入应用inviteMember
(String appId, String userId, int timeout) 邀请人员成为应用的成员。listMember
(String appId) 查询第三方应用的成员void
moveOwnership
(String appId, String userId) 第三方应用所有权转移
-
Constructor Details
-
ThirdPartAppMemberHttpEndpoint
public ThirdPartAppMemberHttpEndpoint(ThirdPartyAppMemberService thirdPartyAppMemberService, ThirdPartyAppPermissionManager thirdPartyAppPermissionManager)
-
-
Method Details
-
inviteMember
@PostMapping("/third-party-app/{appId}/member") public String inviteMember(@PathVariable String appId, @RequestParam(required=false) String userId, @RequestParam(required=false,defaultValue="24") int timeout) 邀请人员成为应用的成员。- Parameters:
appId
- 应用IDuserId
- 用户ID。如果为空,则生成对所有人有效的邀请码timeout
- 邀请码有效期。单位:小时。默认为24。- Returns:
- 邀请码
-
acceptInvitation
@PutMapping("/third-party-app/-/member") public io.github.xezzon.zeroweb.common.domain.Id acceptInvitation(@RequestParam String token) 持邀请码加入应用- Parameters:
token
- 邀请码- Returns:
- 成员ID
-
listMember
@GetMapping("/third-party-app/{appId}/member") public List<ThirdPartyAppMember> listMember(@PathVariable String appId) 查询第三方应用的成员- Parameters:
appId
- 第三方应用ID
-
moveOwnership
@PatchMapping("/third-party-app/{appId}/owner") public void moveOwnership(@PathVariable String appId, @RequestParam String userId) 第三方应用所有权转移- Parameters:
userId
- 转移的目标用户
-