Class ThirdPartAppMemberHttpEndpoint

java.lang.Object
io.github.xezzon.zeroweb.third_party_app.authn.ThirdPartAppMemberHttpEndpoint

@RestController public class ThirdPartAppMemberHttpEndpoint extends Object
第三方应用成员管理
Author:
xezzon
  • Constructor Details

    • ThirdPartAppMemberHttpEndpoint

      public ThirdPartAppMemberHttpEndpoint(ThirdPartyAppMemberService thirdPartyAppMemberService, ThirdPartyAppPermissionManager thirdPartyAppPermissionManager)
      依赖注入
      Parameters:
      thirdPartyAppMemberService - 第三方应用成员管理服务
      thirdPartyAppPermissionManager - 第三方应用权限管理服务
  • Method Details

    • inviteMember

      @PostMapping("/third-party-app/{appId}/member") public String inviteMember(@PathVariable @NotBlank @NotBlank String appId, @RequestParam(required=false) String userId, @RequestParam(required=false,defaultValue="24") int timeout)
      邀请人员成为应用的成员。
      Parameters:
      appId - 应用ID
      userId - 用户ID。如果为空,则生成对所有人有效的邀请码
      timeout - 邀请码有效期。单位:小时。默认为24。
      Returns:
      邀请码
    • acceptInvitation

      @PutMapping("/third-party-app/-/member") public io.github.xezzon.zeroweb.common.domain.Id acceptInvitation(@RequestParam @NotBlank @NotBlank String token)
      持邀请码加入应用
      Parameters:
      token - 邀请码
      Returns:
      成员ID
    • listMember

      @GetMapping("/third-party-app/{appId}/member") public List<ThirdPartyAppMember> listMember(@PathVariable @NotBlank @NotBlank String appId)
      查询第三方应用的成员
      Parameters:
      appId - 第三方应用ID
      Returns:
      第三方应用成员列表
    • moveOwnership

      @PatchMapping("/third-party-app/{appId}/owner") public void moveOwnership(@PathVariable @NotBlank @NotBlank String appId, @RequestParam @NotBlank @NotBlank String userId)
      第三方应用所有权转移
      Parameters:
      appId - 第三方应用 ID
      userId - 转移的目标用户