Skip to content

Commit f7cf2c6

Browse files
committed
fix scala 2.12 compat issues
1 parent 0a17d96 commit f7cf2c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shared/src/main/scala/org/pac4j/play/filters/SecurityFilter.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class SecurityFilter @Inject()(configuration: Configuration, config: Config)
9494

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

124124
private def findRule(request: RequestHeader): Option[Rule] = {
125125
val pathNormalized = getNormalizedPath(request)
126-
rules.find(rule => rule.compiledRegex.matches(pathNormalized))
126+
rules.find(rule => rule.compiledRegex.pattern.matcher(pathNormalized).matches)
127127
}
128128

129129
private def getNormalizedPath(request: RequestHeader): String = {

0 commit comments

Comments
 (0)