Class AppleAuthController

java.lang.Object
com.bytedesk.core.rbac.auth.apple.AppleAuthController

@RestController @RequestMapping("/auth/apple") @Description("Apple Sign-In OAuth Login") public class AppleAuthController extends Object
Apple Sign-In OAuth Login Documentation: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api
  • Field Details

  • Constructor Details

    • AppleAuthController

      public AppleAuthController()
  • Method Details

    • authorize

      @GetMapping("/authorize") public org.springframework.http.ResponseEntity<?> authorize(@RequestParam(value="redirectUri",required=false) String redirectUri, @RequestParam(value="state",required=false) String state, @RequestParam(value="scope",required=false) String scope)
    • login

      @PostMapping("/login") @ActionAnnotation(title="auth", action="\u5bc6\u7801\u767b\u5f55", description="Login with Apple Code") public org.springframework.http.ResponseEntity<?> login(@RequestBody AppleLoginRequest requestBody, jakarta.servlet.http.HttpServletRequest httpRequest)
      前端在 Apple 回调页拿到 code 和 id_token 后,POST 到这里换取本地登录态
    • generateRandomState

      private String generateRandomState()
      生成随机state参数
    • buildFullName

      构建完整姓名