Skip to content

Commit

Permalink
feat: 支持PKCE模式OAuth认证 #1124
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuwan committed Sep 11, 2023
1 parent 9c1b846 commit 47f213e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ class OauthAuthorizationServiceImpl(
code: String?,
codeVerifier: String?
): TAccount {
if (clientSecret.isNullOrBlank() && code.isNullOrBlank() && codeVerifier.isNullOrBlank()) {
throw ErrorCodeException(CommonMessageCode.PARAMETER_MISSING, "clientSecret or codeVerifier")
}

val client = accountRepository.findById(clientId)
.orElseThrow { ErrorCodeException(AuthMessageCode.AUTH_CLIENT_NOT_EXIST) }

Expand Down

0 comments on commit 47f213e

Please sign in to comment.