Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt committed Mar 28, 2024
1 parent 698ab44 commit f6d1e7e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package org.knora.webapi.routing

import org.apache.pekko
import pdi.jwt.JwtAlgorithm
import pdi.jwt.JwtSprayJson
import pdi.jwt.JwtZIOJson
import spray.json.JsString
import zio.ZIO

Expand Down Expand Up @@ -45,7 +45,7 @@ class JwtServiceSpec extends CoreSpec with ImplicitSender {
def createTokenAndExtractAudience(user: User) = for {
token <- ZIO.serviceWithZIO[JwtService](_.createJwt(user))
jwtConfig <- ZIO.service[JwtConfig]
decoded = JwtSprayJson.decodeAll(token.jwtString, jwtConfig.secret, Seq(JwtAlgorithm.HS256))
decoded = JwtZIOJson.decodeAll(token.jwtString, jwtConfig.secret, Seq(JwtAlgorithm.HS256))
audience = decoded.toOption.flatMap { case (_, claims, _) => claims.audience }.head
} yield audience

Expand Down

0 comments on commit f6d1e7e

Please sign in to comment.