Skip to content

Commit

Permalink
Using varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
ESchouten committed Apr 15, 2019
1 parent bd9e505 commit ecfe94d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class JWTSecurityContextRepository(
private val userDetailsService: UserDetailsService,
private val tokenTtlMs: Int = 30 * 60 * 1000,
private val key: SecretKey = Keys.secretKeyFor(SignatureAlgorithm.HS512),
private val claimFunctions: List<(String) -> Pair<String, Any>> = emptyList())
vararg val claimFunctions: (String) -> Pair<String, Any>)
: SecurityContextRepository {

private val logger = LoggerFactory.getLogger(JWTSecurityContextRepository::class.java)
Expand Down Expand Up @@ -107,5 +107,5 @@ class JWTSecurityContextRepository(
Jwts.parser()
.setSigningKey(key)
.parseClaimsJws(header.removePrefix(HEADER_START))
.body.subject
.body.subject!!
}

0 comments on commit ecfe94d

Please sign in to comment.