Skip to content

Commit

Permalink
chore: logging 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdtkdgns committed Jul 3, 2024
1 parent 047b789 commit 48f8b5d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class OidcService(
oidcPublicKeysResponse: OidcPublicKeysResponse,
): OidcDecodePayload {
val jwt = decodeIdToken(token, oidcPublicKeysResponse.keys)
?: throw InvalidTokenException(ErrorCode.INVALID_TOKEN)
logger.info { "1" }
jwt ?: throw InvalidTokenException(ErrorCode.INVALID_TOKEN)

verifyToken(jwt, iss, aud)

Expand Down Expand Up @@ -128,6 +129,7 @@ class OidcService(
val verifyAud = token.audience.firstOrNull() == aud
val verifyIssuer = token.issuer == iss

logger.info { "2" }
if (!verifyTime || !verifyAud || !verifyIssuer) {
throw InvalidTokenException(ErrorCode.INVALID_TOKEN)
}
Expand Down

0 comments on commit 48f8b5d

Please sign in to comment.