Skip to content

Commit

Permalink
compile problem
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Oct 7, 2023
1 parent 01f6fd8 commit bbf6714
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private[auth] object GoogleOAuth2 {
.expiresIn(3600)
.issuedNow

JwtSprayJson.encode(claim, privateKey, RS256)
JwtSprayJson(clock).encode(claim, privateKey, RS256)
}

final case class JwtClaimContent(scope: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ private[google] trait JwtSprayJsonParser[H, C] extends JwtJsonCommon[JsObject, H
}

@InternalApi
private[google] object JwtSprayJson extends JwtSprayJsonParser[JwtHeader, JwtClaim] {
import DefaultJsonProtocol._

private[google] object JwtSprayJson {
def apply(clock: Clock): JwtSprayJson = new JwtSprayJson(clock)
}

@InternalApi
private[google] class JwtSprayJson private (defaultClock: Clock)
extends JwtSprayJsonParser[JwtHeader, JwtClaim] {
import DefaultJsonProtocol._
implicit val clock: Clock = defaultClock

override def parseHeader(header: String): JwtHeader = {
val jsObj = parse(header)
Expand Down Expand Up @@ -75,10 +80,3 @@ private[google] object JwtSprayJson extends JwtSprayJsonParser[JwtHeader, JwtCla
private[this] def safeGetField[A: JsonReader](js: JsObject, name: String) =
js.fields.get(name).flatMap(safeRead[A])
}

@InternalApi
private[google] class JwtSprayJson private (override val clock: Clock)
extends JwtSprayJsonParser[JwtHeader, JwtClaim] {
override def parseHeader(header: String): JwtHeader = JwtSprayJson.parseHeader(header)
override def parseClaim(header: String): JwtClaim = JwtSprayJson.parseClaim(header)
}

0 comments on commit bbf6714

Please sign in to comment.