Skip to content

Commit 67b072e

Browse files
committed
log what's wrong with the JWT when it doesn't get accepted.
1 parent 377fcc3 commit 67b072e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/main/scala/tech/beshu/ror/acl/blocks/rules/JwtAuthRule.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class JwtAuthRule(val settings: JwtAuthRule.Settings)
115115
.toEither
116116
.map(JwtTokenPayload.apply)
117117
.left.map { ex =>
118-
logger.errorEx(s"JWT token '${token.show}' parsing error", ex)
118+
logger.errorEx(s"JWT token '${token.show}' parsing error: " + ex.getClass.getSimpleName, ex)
119119
()
120120
}
121121
case _ =>
@@ -126,7 +126,7 @@ class JwtAuthRule(val settings: JwtAuthRule.Settings)
126126
.toEither
127127
.map(JwtTokenPayload.apply)
128128
.left.map { ex =>
129-
logger.errorEx(s"JWT token '${token.show}' parsing error", ex)
129+
logger.errorEx(s"JWT token '${token.show}' parsing error: " + ex.getClass.getSimpleName, ex)
130130
()
131131
}
132132
}

core/src/main/scala/tech/beshu/ror/acl/blocks/rules/RorKbnAuthRule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RorKbnAuthRule(val settings: Settings)
9999
.toEither
100100
.map(JwtTokenPayload.apply)
101101
.left.map { ex =>
102-
logger.errorEx(s"JWT token '${token.show}' parsing error", ex)
102+
logger.errorEx(s"JWT token '${token.show}' parsing error " + ex.getClass.getSimpleName, ex)
103103
()
104104
}
105105
}

0 commit comments

Comments
 (0)