Skip to content

Commit

Permalink
refactor: replace use of deprecated queryParameters with bodyAsFormPa…
Browse files Browse the repository at this point in the history
…rameters
  • Loading branch information
tommytroen committed Feb 15, 2024
1 parent 6763539 commit 3cbb107
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ data class RequestMapping(
val claims: Map<String, Any> = emptyMap(),
val typeHeader: String = JOSEObjectType.JWT.type,
) {
fun isMatch(tokenRequest: TokenRequest): Boolean =
tokenRequest.toHTTPRequest().queryParameters[requestParam]?.any {
fun isMatch(tokenRequest: TokenRequest): Boolean {
return tokenRequest.toHTTPRequest().bodyAsFormParameters[requestParam]?.any {
match == "*" || match == it || match.toRegex().matchEntire(it) != null
} ?: false
}
}

0 comments on commit 3cbb107

Please sign in to comment.