Skip to content

Commit

Permalink
fix scala 2.12 compat issues
Browse files Browse the repository at this point in the history
  • Loading branch information
reardonj committed Dec 3, 2024
1 parent 0a17d96 commit f7cf2c6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class SecurityFilter @Inject()(configuration: Configuration, config: Config)

def checkSecurity(request: RequestHeader, rule: RuleData, remainingRules: Seq[RuleData]): Future[Result] =
securityAction
.call(parameters, rule.clients, rule.authorizers, rule.matchers)
.asScala
.call(parameters, rule.clients, rule.authorizers, rule.matchers)
.toScala
.flatMap { secureActionResult =>
if (secureActionResult.isInstanceOf[PlayWebContextResultHolder]) {
val newCtx = secureActionResult.asInstanceOf[PlayWebContextResultHolder].getPlayWebContext
Expand Down Expand Up @@ -123,7 +123,7 @@ class SecurityFilter @Inject()(configuration: Configuration, config: Config)

private def findRule(request: RequestHeader): Option[Rule] = {
val pathNormalized = getNormalizedPath(request)
rules.find(rule => rule.compiledRegex.matches(pathNormalized))
rules.find(rule => rule.compiledRegex.pattern.matcher(pathNormalized).matches)
}

private def getNormalizedPath(request: RequestHeader): String = {
Expand Down

0 comments on commit f7cf2c6

Please sign in to comment.