1 package org.make.api.user.social
2 
3 import akka.http.scaladsl.model._
4 import akka.http.scaladsl.model.headers.RawHeader
5 import akka.http.scaladsl.{Http, HttpExt}
6 import cats.data.EitherT
7 import cats.syntax.bifunctor._
8 import cats.syntax.either._
9 import cats.syntax.traverse._
10 import grizzled.slf4j.Logging
11 import io.circe
12 import io.circe.Decoder.Result
13 import io.circe.DecodingFailure.Reason
14 import io.circe.generic.semiauto.deriveDecoder
15 import io.circe.parser.parse
16 import io.circe.{Decoder, DecodingFailure, HCursor}
17 import org.make.api.technical.ActorSystemComponent
18 import org.make.api.user.social.models.oidc.{UserInfo => OidcUserInfo}
19 import org.make.core.Validation
20 import org.make.core.operation.OidcConfiguration
21 import pdi.jwt.{JwtAlgorithm, JwtCirce, JwtOptions}
22 
23 import java.nio.charset.Charset
24 import scala.concurrent.duration.DurationInt
25 import scala.concurrent.{ExecutionContextExecutor, Future}
26 
27 trait OpenIDConnectApiComponent {
28   def openIDConnectApi: OpenIDConnectApi
29 }
30 
31 trait OpenIDConnectApi {
32   def getUserInfo(
33     authorizationCode: String,
34     oidcConfiguration: OidcConfiguration,
35     redirectUri: String
36   ): Future[OidcUserInfo]
37 }
38 
39 final private[social] case class OidcTokenResponse(
40   access_token: String,
41   token_type: String,
42   expires_in: Int,
43   id_token: String,
44   scope: Option[String]
45 )
46 private[social] object OidcTokenResponse {
47   implicit val decoder: Decoder[OidcTokenResponse] = deriveDecoder
48 }
49 
50 final private[social] case class OidcTokenPayload(
51   email: String,
52   firstName: Option[String],
53   externalUserId: Option[String],
54   iat: Long,
55   exp: Long
56 ) {
57   lazy val toUserInfo: OidcUserInfo = OidcUserInfo(email, firstName, externalUserId, iat, exp)
58 }
59 private[social] object OidcTokenPayload {
60   def decoder(oidcConfiguration: OidcConfiguration): Decoder[OidcTokenPayload] = new Decoder[OidcTokenPayload] {
61     final def apply(c: HCursor): Result[OidcTokenPayload] =
62       for {
63         email <- c
64           .downField("sub")
65           .as[String]
66           .toOption
67           .filter(Validation.emailRegex.matches)
68           .orElse(
69             oidcConfiguration.jwtEmailAltField
70               .flatMap(c.downField(_).as[String].toOption.filter(Validation.emailRegex.matches))
71           )
72           .toRight(DecodingFailure(Reason.CustomReason("email is mandatory and must be valid"), c.history))
73         iat <- c.downField("iat").as[Long]
74         exp <- c.downField("exp").as[Long]
75       } yield {
76         val firstName = oidcConfiguration.jwtGivenNameAltField.traverse(c.downField(_).as[String].toOption).flatten
77         val externalUserId = oidcConfiguration.jwtUserIdAltField.traverse(c.downField(_).as[String].toOption).flatten
78         OidcTokenPayload(email, firstName, externalUserId, iat, exp)
79       }
80   }
81 }
82 
83 trait DefaultOpenIDConnectApiComponent extends OpenIDConnectApiComponent {
84   self: ActorSystemComponent =>
85 
86   override def openIDConnectApi: OpenIDConnectApi = new DefaultOpenIDConnectApi
87 
88   private class DefaultOpenIDConnectApi extends OpenIDConnectApi with Logging {
89     implicit val executor: ExecutionContextExecutor = actorSystem.executionContext
90 
91     private val http: HttpExt = Http()
92 
93     private def claimUserInfoData(
94       userInfoEndpoint: String,
95       accessToken: String
96     ): EitherT[Future, circe.Error, Map[String, String]] =
97       for {
98         userInfoResponse <- EitherT.right(
99           http.singleRequest(
100             HttpRequest(method = HttpMethods.GET, uri = userInfoEndpoint)
101               .withHeaders(RawHeader("Authorization", s"Bearer $accessToken"))
102           )
103         )
104         userInfoData <- EitherT(strictToString(userInfoResponse).map(parse(_).flatMap(_.as[Map[String, String]])))
105       } yield userInfoData
106 
107     @SuppressWarnings(Array("org.wartremover.warts.Throw"))
108     def getUserInfo(
109       authorizationCode: String,
110       oidcConfiguration: OidcConfiguration,
111       redirectUri: String
112     ): Future[OidcUserInfo] = {
113       (for {
114         clientSecret <- oidcConfiguration.clientSecret
115           .toRight(new IllegalArgumentException("Client secret is required"))
116           .toEitherT[Future]
117         tokenResponse <- EitherT.right(
118           http
119             .singleRequest(
120               HttpRequest(method = HttpMethods.POST, uri = oidcConfiguration.tokenEndpoint)
121                 .withHeaders(RawHeader("Content-Type", "application/x-www-form-urlencoded"))
122                 .withEntity(
123                   FormData(
124                     "grant_type" -> "authorization_code",
125                     "client_id" -> oidcConfiguration.clientId,
126                     "client_secret" -> clientSecret,
127                     "redirect_uri" -> redirectUri,
128                     "code" -> authorizationCode
129                   ).toEntity
130                 )
131             )
132         )
133         tokenResponse <- EitherT(strictToString(tokenResponse).map(parse(_).flatMap(_.as[OidcTokenResponse])))
134         jwtUserInfo <- JwtCirce
135           .decodeJson(tokenResponse.id_token, clientSecret, Seq(JwtAlgorithm.RS512), JwtOptions(signature = false))
136           .toEither
137           .flatMap(_.as[OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map(_.toUserInfo))
138           .toEitherT[Future]
139         userInfo <- (jwtUserInfo.firstName, oidcConfiguration.userInfoEndpoint) match {
140           case (None, Some(userInfoEndpoint)) =>
141             claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map { data =>
142               val firstName = oidcConfiguration.jwtGivenNameAltField
143                 .flatMap(data.get)
144                 .orElse(jwtUserInfo.firstName)
145               val externalUserId =
146                 oidcConfiguration.jwtUserIdAltField.flatMap(data.get).orElse(jwtUserInfo.externalUserId)
147               jwtUserInfo.copy(firstName = firstName, externalUserId = externalUserId)
148             }.leftWiden[Throwable]
149           case _ => EitherT.rightT[Future, Throwable](jwtUserInfo)
150         }
151       } yield userInfo).value.flatMap {
152         case Right(userInfo) => Future.successful(userInfo)
153         case Left(thr)       => Future.failed(thr)
154       }
155     }
156 
157     private def strictToString(response: HttpResponse, expectedCode: StatusCode = StatusCodes.OK): Future[String] = {
158       logger.debug(s"Server answered $response")
159       response match {
160         case HttpResponse(`expectedCode`, _, entity, _) =>
161           val result = entity
162             .toStrict(2.second)
163             .map(_.data.decodeString(Charset.forName("UTF-8")))
164           result
165         case HttpResponse(code, _, entity, _) =>
166           entity.toStrict(2.second).flatMap { entity =>
167             val response = entity.data.decodeString(Charset.forName("UTF-8"))
168             Future.failed(SocialProviderException(s"Got unexpected response code: $code, with body: $response"))
169           }
170       }
171     }
172   }
173 }
Line Stmt Id Pos Tree Symbol Tests Code
47 32391 1418 - 1431 ApplyToImplicitArgs io.circe.generic.semiauto.deriveDecoder io.circe.generic.semiauto.deriveDecoder[org.make.api.user.social.OidcTokenResponse]({ val inst$macro$24: io.circe.generic.decoding.DerivedDecoder[org.make.api.user.social.OidcTokenResponse] = { final class anon$lazy$macro$23 extends AnyRef with Serializable { def <init>(): anon$lazy$macro$23 = { anon$lazy$macro$23.super.<init>(); () }; <stable> <accessor> lazy val inst$macro$1: io.circe.generic.decoding.DerivedDecoder[org.make.api.user.social.OidcTokenResponse] = decoding.this.DerivedDecoder.deriveDecoder[org.make.api.user.social.OidcTokenResponse, shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](shapeless.this.LabelledGeneric.materializeProduct[org.make.api.user.social.OidcTokenResponse, (Symbol @@ String("access_token")) :: (Symbol @@ String("token_type")) :: (Symbol @@ String("expires_in")) :: (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil, String :: String :: Int :: String :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](DefaultSymbolicLabelling.instance[org.make.api.user.social.OidcTokenResponse, (Symbol @@ String("access_token")) :: (Symbol @@ String("token_type")) :: (Symbol @@ String("expires_in")) :: (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil](::.apply[Symbol @@ String("access_token"), (Symbol @@ String("token_type")) :: (Symbol @@ String("expires_in")) :: (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil.type](scala.Symbol.apply("access_token").asInstanceOf[Symbol @@ String("access_token")], ::.apply[Symbol @@ String("token_type"), (Symbol @@ String("expires_in")) :: (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil.type](scala.Symbol.apply("token_type").asInstanceOf[Symbol @@ String("token_type")], ::.apply[Symbol @@ String("expires_in"), (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil.type](scala.Symbol.apply("expires_in").asInstanceOf[Symbol @@ String("expires_in")], ::.apply[Symbol @@ String("id_token"), (Symbol @@ String("scope")) :: shapeless.HNil.type](scala.Symbol.apply("id_token").asInstanceOf[Symbol @@ String("id_token")], ::.apply[Symbol @@ String("scope"), shapeless.HNil.type](scala.Symbol.apply("scope").asInstanceOf[Symbol @@ String("scope")], HNil)))))), Generic.instance[org.make.api.user.social.OidcTokenResponse, String :: String :: Int :: String :: Option[String] :: shapeless.HNil](((x0$3: org.make.api.user.social.OidcTokenResponse) => x0$3 match { case (access_token: String, token_type: String, expires_in: Int, id_token: String, scope: Option[String]): org.make.api.user.social.OidcTokenResponse((access_token$macro$17 @ _), (token_type$macro$18 @ _), (expires_in$macro$19 @ _), (id_token$macro$20 @ _), (scope$macro$21 @ _)) => ::.apply[String, String :: Int :: String :: Option[String] :: shapeless.HNil.type](access_token$macro$17, ::.apply[String, Int :: String :: Option[String] :: shapeless.HNil.type](token_type$macro$18, ::.apply[Int, String :: Option[String] :: shapeless.HNil.type](expires_in$macro$19, ::.apply[String, Option[String] :: shapeless.HNil.type](id_token$macro$20, ::.apply[Option[String], shapeless.HNil.type](scope$macro$21, HNil))))).asInstanceOf[String :: String :: Int :: String :: Option[String] :: shapeless.HNil] }), ((x0$4: String :: String :: Int :: String :: Option[String] :: shapeless.HNil) => x0$4 match { case (head: String, tail: String :: Int :: String :: Option[String] :: shapeless.HNil): String :: String :: Int :: String :: Option[String] :: shapeless.HNil((access_token$macro$12 @ _), (head: String, tail: Int :: String :: Option[String] :: shapeless.HNil): String :: Int :: String :: Option[String] :: shapeless.HNil((token_type$macro$13 @ _), (head: Int, tail: String :: Option[String] :: shapeless.HNil): Int :: String :: Option[String] :: shapeless.HNil((expires_in$macro$14 @ _), (head: String, tail: Option[String] :: shapeless.HNil): String :: Option[String] :: shapeless.HNil((id_token$macro$15 @ _), (head: Option[String], tail: shapeless.HNil): Option[String] :: shapeless.HNil((scope$macro$16 @ _), HNil))))) => social.this.OidcTokenResponse.apply(access_token$macro$12, token_type$macro$13, expires_in$macro$14, id_token$macro$15, scope$macro$16) })), hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("access_token"), String, (Symbol @@ String("token_type")) :: (Symbol @@ String("expires_in")) :: (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil, String :: Int :: String :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("token_type"), String, (Symbol @@ String("expires_in")) :: (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil, Int :: String :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("expires_in"), Int, (Symbol @@ String("id_token")) :: (Symbol @@ String("scope")) :: shapeless.HNil, String :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("id_token"), String, (Symbol @@ String("scope")) :: shapeless.HNil, Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("scope"), Option[String], shapeless.HNil, shapeless.HNil, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hnilZipWithKeys, Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("scope")]](scala.Symbol.apply("scope").asInstanceOf[Symbol @@ String("scope")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("scope")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("id_token")]](scala.Symbol.apply("id_token").asInstanceOf[Symbol @@ String("id_token")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("id_token")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("expires_in")]](scala.Symbol.apply("expires_in").asInstanceOf[Symbol @@ String("expires_in")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("expires_in")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("token_type")]](scala.Symbol.apply("token_type").asInstanceOf[Symbol @@ String("token_type")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("token_type")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("access_token")]](scala.Symbol.apply("access_token").asInstanceOf[Symbol @@ String("access_token")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("access_token")]])), scala.this.<:<.refl[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]), shapeless.Lazy.apply[io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]](anon$lazy$macro$23.this.inst$macro$22)).asInstanceOf[io.circe.generic.decoding.DerivedDecoder[org.make.api.user.social.OidcTokenResponse]]; <stable> <accessor> lazy val inst$macro$22: io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ({ final class $anon extends io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] { def <init>(): <$anon: io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]> = { $anon.super.<init>(); () }; private[this] val circeGenericDecoderForexpires_in: io.circe.Decoder[Int] = circe.this.Decoder.decodeInt; private[this] val circeGenericDecoderForid_token: io.circe.Decoder[String] = circe.this.Decoder.decodeString; private[this] val circeGenericDecoderForscope: io.circe.Decoder[Option[String]] = circe.this.Decoder.decodeOption[String](circe.this.Decoder.decodeString); final def apply(c: io.circe.HCursor): io.circe.Decoder.Result[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("access_token"), String, shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForid_token.tryDecode(c.downField("access_token")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("token_type"), String, shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForid_token.tryDecode(c.downField("token_type")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("expires_in"), Int, shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForexpires_in.tryDecode(c.downField("expires_in")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("id_token"), String, shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForid_token.tryDecode(c.downField("id_token")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("scope"), Option[String], shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForscope.tryDecode(c.downField("scope")), ReprDecoder.hnilResult)(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance); final override def decodeAccumulating(c: io.circe.HCursor): io.circe.Decoder.AccumulatingResult[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("access_token"), String, shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForid_token.tryDecodeAccumulating(c.downField("access_token")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("token_type"), String, shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForid_token.tryDecodeAccumulating(c.downField("token_type")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("expires_in"), Int, shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForexpires_in.tryDecodeAccumulating(c.downField("expires_in")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("id_token"), String, shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForid_token.tryDecodeAccumulating(c.downField("id_token")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("scope"), Option[String], shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForscope.tryDecodeAccumulating(c.downField("scope")), ReprDecoder.hnilResultAccumulating)(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance) }; new $anon() }: io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]).asInstanceOf[io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("access_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("token_type"),String] :: shapeless.labelled.FieldType[Symbol @@ String("expires_in"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("id_token"),String] :: shapeless.labelled.FieldType[Symbol @@ String("scope"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]] }; new anon$lazy$macro$23().inst$macro$1 }; shapeless.Lazy.apply[io.circe.generic.decoding.DerivedDecoder[org.make.api.user.social.OidcTokenResponse]](inst$macro$24) })
60 31045 1815 - 1818 Apply org.make.api.user.social.OidcTokenPayload.$anon.<init> org.make.api.user.social.openidconnectapispec new $anon()
63 38661 1913 - 2752 Apply scala.util.Either.flatMap org.make.api.user.social.openidconnectapispec c.downField("sub").as[String](circe.this.Decoder.decodeString).toOption.filter(((source: CharSequence) => org.make.core.Validation.emailRegex.matches(source))).orElse[String](oidcConfiguration.jwtEmailAltField.flatMap[String](((x$1: String) => c.downField(x$1).as[String](circe.this.Decoder.decodeString).toOption.filter(((source: CharSequence) => org.make.core.Validation.emailRegex.matches(source)))))).toRight[io.circe.DecodingFailure](io.circe.DecodingFailure.apply(io.circe.DecodingFailure.Reason.CustomReason.apply("email is mandatory and must be valid"), c.history)).flatMap[io.circe.DecodingFailure, org.make.api.user.social.OidcTokenPayload](((email: String) => c.downField("iat").as[Long](circe.this.Decoder.decodeLong).flatMap[io.circe.DecodingFailure, org.make.api.user.social.OidcTokenPayload](((iat: Long) => c.downField("exp").as[Long](circe.this.Decoder.decodeLong).map[org.make.api.user.social.OidcTokenPayload](((exp: Long) => { val firstName: Option[String] = cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtGivenNameAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$2: String) => c.downField(x$2).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]]); val externalUserId: Option[String] = cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtUserIdAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$3: String) => c.downField(x$3).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]]); OidcTokenPayload.apply(email, firstName, externalUserId, iat, exp) }))))))
64 44908 1959 - 1964 Literal <nosymbol> org.make.api.user.social.openidconnectapispec "sub"
65 37323 1979 - 1979 Select io.circe.Decoder.decodeString org.make.api.user.social.openidconnectapispec circe.this.Decoder.decodeString
67 51145 2026 - 2055 Apply scala.util.matching.Regex.matches org.make.api.user.social.openidconnectapispec org.make.core.Validation.emailRegex.matches(source)
70 43875 2088 - 2219 Apply scala.Option.flatMap org.make.api.user.social.openidconnectapispec oidcConfiguration.jwtEmailAltField.flatMap[String](((x$1: String) => c.downField(x$1).as[String](circe.this.Decoder.decodeString).toOption.filter(((source: CharSequence) => org.make.core.Validation.emailRegex.matches(source)))))
70 30500 2146 - 2218 Apply scala.Option.filter org.make.api.user.social.openidconnectapispec c.downField(x$1).as[String](circe.this.Decoder.decodeString).toOption.filter(((source: CharSequence) => org.make.core.Validation.emailRegex.matches(source)))
70 38409 2188 - 2217 Apply scala.util.matching.Regex.matches org.make.api.user.social.openidconnectapispec org.make.core.Validation.emailRegex.matches(source)
70 47246 2163 - 2163 Select io.circe.Decoder.decodeString org.make.api.user.social.openidconnectapispec circe.this.Decoder.decodeString
72 44944 2251 - 2338 Apply io.circe.DecodingFailure.apply io.circe.DecodingFailure.apply(io.circe.DecodingFailure.Reason.CustomReason.apply("email is mandatory and must be valid"), c.history)
72 37040 2267 - 2326 Apply io.circe.DecodingFailure.Reason.CustomReason.apply io.circe.DecodingFailure.Reason.CustomReason.apply("email is mandatory and must be valid")
72 32861 2328 - 2337 Select io.circe.ACursor.history c.history
73 51178 2376 - 2376 Select io.circe.Decoder.decodeLong org.make.api.user.social.openidconnectapispec circe.this.Decoder.decodeLong
73 42825 2348 - 2752 Apply scala.util.Either.flatMap org.make.api.user.social.openidconnectapispec c.downField("iat").as[Long](circe.this.Decoder.decodeLong).flatMap[io.circe.DecodingFailure, org.make.api.user.social.OidcTokenPayload](((iat: Long) => c.downField("exp").as[Long](circe.this.Decoder.decodeLong).map[org.make.api.user.social.OidcTokenPayload](((exp: Long) => { val firstName: Option[String] = cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtGivenNameAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$2: String) => c.downField(x$2).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]]); val externalUserId: Option[String] = cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtUserIdAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$3: String) => c.downField(x$3).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]]); OidcTokenPayload.apply(email, firstName, externalUserId, iat, exp) }))))
73 37079 2367 - 2372 Literal <nosymbol> org.make.api.user.social.openidconnectapispec "iat"
74 43578 2410 - 2415 Literal <nosymbol> org.make.api.user.social.openidconnectapispec "exp"
74 38873 2419 - 2419 Select io.circe.Decoder.decodeLong org.make.api.user.social.openidconnectapispec circe.this.Decoder.decodeLong
74 50975 2391 - 2752 Apply scala.util.Either.map org.make.api.user.social.openidconnectapispec c.downField("exp").as[Long](circe.this.Decoder.decodeLong).map[org.make.api.user.social.OidcTokenPayload](((exp: Long) => { val firstName: Option[String] = cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtGivenNameAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$2: String) => c.downField(x$2).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]]); val externalUserId: Option[String] = cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtUserIdAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$3: String) => c.downField(x$3).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]]); OidcTokenPayload.apply(email, firstName, externalUserId, iat, exp) }))
76 44389 2484 - 2484 Select cats.UnorderedFoldable.catsTraverseForOption org.make.api.user.social.openidconnectapispec cats.this.UnorderedFoldable.catsTraverseForOption
76 51215 2466 - 2557 ApplyToImplicitArgs scala.Option.flatten org.make.api.user.social.openidconnectapispec cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtGivenNameAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$2: String) => c.downField(x$2).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]])
76 32350 2514 - 2548 Select scala.util.Either.toOption org.make.api.user.social.openidconnectapispec c.downField(x$2).as[String](circe.this.Decoder.decodeString).toOption
76 36800 2531 - 2531 Select io.circe.Decoder.decodeString org.make.api.user.social.openidconnectapispec circe.this.Decoder.decodeString
76 30534 2466 - 2504 Select org.make.core.operation.OidcConfiguration.jwtGivenNameAltField org.make.api.user.social.openidconnectapispec oidcConfiguration.jwtGivenNameAltField
76 37116 2550 - 2550 TypeApply scala.<:<.refl org.make.api.user.social.openidconnectapispec scala.this.<:<.refl[Option[String]]
76 45415 2513 - 2513 Select cats.Invariant.catsInstancesForOption org.make.api.user.social.openidconnectapispec cats.this.Invariant.catsInstancesForOption
77 31003 2649 - 2649 Select io.circe.Decoder.decodeString org.make.api.user.social.openidconnectapispec circe.this.Decoder.decodeString
77 38916 2605 - 2605 Select cats.UnorderedFoldable.catsTraverseForOption org.make.api.user.social.openidconnectapispec cats.this.UnorderedFoldable.catsTraverseForOption
77 43342 2587 - 2622 Select org.make.core.operation.OidcConfiguration.jwtUserIdAltField org.make.api.user.social.openidconnectapispec oidcConfiguration.jwtUserIdAltField
77 49326 2668 - 2668 TypeApply scala.<:<.refl org.make.api.user.social.openidconnectapispec scala.this.<:<.refl[Option[String]]
77 44421 2632 - 2666 Select scala.util.Either.toOption org.make.api.user.social.openidconnectapispec c.downField(x$3).as[String](circe.this.Decoder.decodeString).toOption
77 36842 2631 - 2631 Select cats.Invariant.catsInstancesForOption org.make.api.user.social.openidconnectapispec cats.this.Invariant.catsInstancesForOption
77 45458 2587 - 2675 ApplyToImplicitArgs scala.Option.flatten org.make.api.user.social.openidconnectapispec cats.syntax.`package`.traverse.toTraverseOps[Option, String](oidcConfiguration.jwtUserIdAltField)(cats.this.UnorderedFoldable.catsTraverseForOption).traverse[Option, String](((x$3: String) => c.downField(x$3).as[String](circe.this.Decoder.decodeString).toOption))(cats.this.Invariant.catsInstancesForOption).flatten[String](scala.this.<:<.refl[Option[String]])
78 37318 2684 - 2744 Apply org.make.api.user.social.OidcTokenPayload.apply org.make.api.user.social.openidconnectapispec OidcTokenPayload.apply(email, firstName, externalUserId, iat, exp)
86 43865 2920 - 2947 Apply org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.<init> new DefaultOpenIDConnectApiComponent.this.DefaultOpenIDConnectApi()
89 36600 3083 - 3111 Select akka.actor.typed.ActorSystem.executionContext DefaultOpenIDConnectApiComponent.this.actorSystem.executionContext
91 45196 3145 - 3151 ApplyToImplicitArgs akka.http.scaladsl.Http.apply akka.http.scaladsl.Http.apply()(DefaultOpenIDConnectApiComponent.this.actorSystem)
91 49361 3149 - 3149 Select org.make.api.technical.ActorSystemComponent.actorSystem DefaultOpenIDConnectApiComponent.this.actorSystem
98 35449 3358 - 3358 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
98 49908 3342 - 3342 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
98 31614 3358 - 3358 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
98 37610 3311 - 3706 ApplyToImplicitArgs cats.data.EitherT.flatMap cats.data.EitherT.right[Nothing].apply[scala.concurrent.Future, akka.http.scaladsl.model.HttpResponse](DefaultOpenIDConnectApi.this.http.singleRequest(akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.GET, model.this.Uri.apply(userInfoEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Authorization", ("Bearer ".+(accessToken): String))), DefaultOpenIDConnectApi.this.http.singleRequest$default$2, DefaultOpenIDConnectApi.this.http.singleRequest$default$3, DefaultOpenIDConnectApi.this.http.singleRequest$default$4))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[io.circe.Error, Map[String,String]](((userInfoResponse: akka.http.scaladsl.model.HttpResponse) => cats.data.EitherT.apply[scala.concurrent.Future, io.circe.Error, Map[String,String]](DefaultOpenIDConnectApi.this.strictToString(userInfoResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,Map[String,String]]](((x$4: String) => io.circe.parser.`package`.parse(x$4).flatMap[io.circe.Error, Map[String,String]](((x$5: io.circe.Json) => x$5.as[Map[String,String]](circe.this.Decoder.decodeMap[String, String](circe.this.KeyDecoder.decodeKeyString, circe.this.Decoder.decodeString))))))(DefaultOpenIDConnectApi.this.executor)).map[Map[String,String]](((userInfoData: Map[String,String]) => userInfoData))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
98 45188 3342 - 3342 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
99 45235 3375 - 3375 Select akka.http.scaladsl.HttpExt.singleRequest$default$2 DefaultOpenIDConnectApi.this.http.singleRequest$default$2
99 43330 3370 - 3554 Apply akka.http.scaladsl.HttpExt.singleRequest DefaultOpenIDConnectApi.this.http.singleRequest(akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.GET, model.this.Uri.apply(userInfoEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Authorization", ("Bearer ".+(accessToken): String))), DefaultOpenIDConnectApi.this.http.singleRequest$default$2, DefaultOpenIDConnectApi.this.http.singleRequest$default$3, DefaultOpenIDConnectApi.this.http.singleRequest$default$4)
99 50160 3375 - 3375 Select akka.http.scaladsl.HttpExt.singleRequest$default$4 DefaultOpenIDConnectApi.this.http.singleRequest$default$4
99 37111 3375 - 3375 Select akka.http.scaladsl.HttpExt.singleRequest$default$3 DefaultOpenIDConnectApi.this.http.singleRequest$default$3
100 37071 3423 - 3438 Select akka.http.scaladsl.model.HttpMethods.GET akka.http.scaladsl.model.HttpMethods.GET
100 50414 3446 - 3462 ApplyImplicitView akka.http.scaladsl.model.Uri.apply model.this.Uri.apply(userInfoEndpoint)
100 38702 3402 - 3402 Select akka.http.scaladsl.model.HttpRequest.apply$default$4 akka.http.scaladsl.model.HttpRequest.apply$default$4
100 30531 3402 - 3402 Select akka.http.scaladsl.model.HttpRequest.apply$default$5 akka.http.scaladsl.model.HttpRequest.apply$default$5
100 42580 3402 - 3402 Select akka.http.scaladsl.model.HttpRequest.apply$default$3 akka.http.scaladsl.model.HttpRequest.apply$default$3
101 36790 3491 - 3541 Apply akka.http.scaladsl.model.headers.RawHeader.apply akka.http.scaladsl.model.headers.RawHeader.apply("Authorization", ("Bearer ".+(accessToken): String))
101 43610 3501 - 3516 Literal <nosymbol> "Authorization"
101 49836 3402 - 3542 Apply akka.http.scaladsl.model.HttpMessage.withHeaders akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.GET, model.this.Uri.apply(userInfoEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Authorization", ("Bearer ".+(accessToken): String)))
104 35486 3597 - 3678 ApplyToImplicitArgs scala.concurrent.Future.map DefaultOpenIDConnectApi.this.strictToString(userInfoResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,Map[String,String]]](((x$4: String) => io.circe.parser.`package`.parse(x$4).flatMap[io.circe.Error, Map[String,String]](((x$5: io.circe.Json) => x$5.as[Map[String,String]](circe.this.Decoder.decodeMap[String, String](circe.this.KeyDecoder.decodeKeyString, circe.this.Decoder.decodeString))))))(DefaultOpenIDConnectApi.this.executor)
104 43085 3633 - 3633 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
104 31039 3586 - 3586 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
104 49871 3655 - 3655 Select io.circe.Decoder.decodeString circe.this.Decoder.decodeString
104 38168 3651 - 3676 ApplyToImplicitArgs io.circe.Json.as x$5.as[Map[String,String]](circe.this.Decoder.decodeMap[String, String](circe.this.KeyDecoder.decodeKeyString, circe.this.Decoder.decodeString))
104 36586 3573 - 3706 ApplyToImplicitArgs cats.data.EitherT.map cats.data.EitherT.apply[scala.concurrent.Future, io.circe.Error, Map[String,String]](DefaultOpenIDConnectApi.this.strictToString(userInfoResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,Map[String,String]]](((x$4: String) => io.circe.parser.`package`.parse(x$4).flatMap[io.circe.Error, Map[String,String]](((x$5: io.circe.Json) => x$5.as[Map[String,String]](circe.this.Decoder.decodeMap[String, String](circe.this.KeyDecoder.decodeKeyString, circe.this.Decoder.decodeString))))))(DefaultOpenIDConnectApi.this.executor)).map[Map[String,String]](((userInfoData: Map[String,String]) => userInfoData))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
104 36559 3655 - 3655 Select io.circe.KeyDecoder.decodeKeyString circe.this.KeyDecoder.decodeKeyString
104 43649 3597 - 3597 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.strictToString$default$2 DefaultOpenIDConnectApi.this.strictToString$default$2
104 50204 3634 - 3677 Apply scala.util.Either.flatMap io.circe.parser.`package`.parse(x$4).flatMap[io.circe.Error, Map[String,String]](((x$5: io.circe.Json) => x$5.as[Map[String,String]](circe.this.Decoder.decodeMap[String, String](circe.this.KeyDecoder.decodeKeyString, circe.this.Decoder.decodeString))))
104 44707 3586 - 3586 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
104 45451 3655 - 3655 ApplyToImplicitArgs io.circe.Decoder.decodeMap circe.this.Decoder.decodeMap[String, String](circe.this.KeyDecoder.decodeKeyString, circe.this.Decoder.decodeString)
114 41563 3958 - 3958 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
114 49433 3958 - 3958 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
115 43120 3961 - 4069 Apply scala.Option.toRight oidcConfiguration.clientSecret.toRight[IllegalArgumentException](new scala.`package`.IllegalArgumentException("Client secret is required"))
115 50731 4011 - 4068 Apply java.lang.IllegalArgumentException.<init> new scala.`package`.IllegalArgumentException("Client secret is required")
116 30779 4090 - 4090 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
116 34977 4090 - 4090 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
117 41318 4137 - 4137 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
117 40531 4121 - 4121 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
117 36667 4107 - 5921 ApplyToImplicitArgs cats.data.EitherT.flatMap cats.data.EitherT.right[Nothing].apply[scala.concurrent.Future, akka.http.scaladsl.model.HttpResponse](DefaultOpenIDConnectApi.this.http.singleRequest(akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.POST, model.this.Uri.apply(oidcConfiguration.tokenEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Content-Type", "application/x-www-form-urlencoded")).withEntity(akka.http.scaladsl.model.FormData.apply(scala.Predef.ArrowAssoc[String]("grant_type").->[String]("authorization_code"), scala.Predef.ArrowAssoc[String]("client_id").->[String](oidcConfiguration.clientId), scala.Predef.ArrowAssoc[String]("client_secret").->[String](clientSecret), scala.Predef.ArrowAssoc[String]("redirect_uri").->[String](redirectUri), scala.Predef.ArrowAssoc[String]("code").->[String](authorizationCode)).toEntity), DefaultOpenIDConnectApi.this.http.singleRequest$default$2, DefaultOpenIDConnectApi.this.http.singleRequest$default$3, DefaultOpenIDConnectApi.this.http.singleRequest$default$4))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((tokenResponse: akka.http.scaladsl.model.HttpResponse) => cats.data.EitherT.apply[scala.concurrent.Future, io.circe.Error, org.make.api.user.social.OidcTokenResponse](DefaultOpenIDConnectApi.this.strictToString(tokenResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,org.make.api.user.social.OidcTokenResponse]](((x$6: String) => io.circe.parser.`package`.parse(x$6).flatMap[io.circe.Error, org.make.api.user.social.OidcTokenResponse](((x$7: io.circe.Json) => x$7.as[org.make.api.user.social.OidcTokenResponse](social.this.OidcTokenResponse.decoder)))))(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((tokenResponse: org.make.api.user.social.OidcTokenResponse) => cats.syntax.`package`.either.catsSyntaxEither[Throwable, org.make.api.user.social.models.oidc.UserInfo](pdi.jwt.JwtCirce.decodeJson(tokenResponse.id_token, clientSecret, scala.`package`.Seq.apply[pdi.jwt.JwtAlgorithm.RS512.type](pdi.jwt.JwtAlgorithm.RS512), pdi.jwt.JwtOptions.apply(false, pdi.jwt.JwtOptions.apply$default$2, pdi.jwt.JwtOptions.apply$default$3, pdi.jwt.JwtOptions.apply$default$4)).toEither.flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((x$8: io.circe.Json) => x$8.as[org.make.api.user.social.OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map[org.make.api.user.social.models.oidc.UserInfo](((x$9: org.make.api.user.social.OidcTokenPayload) => x$9.toUserInfo))))).toEitherT[scala.concurrent.Future](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((jwtUserInfo: org.make.api.user.social.models.oidc.UserInfo) => scala.Tuple2.apply[Option[String], Option[String]](jwtUserInfo.firstName, oidcConfiguration.userInfoEndpoint) match { case (_1: Option[String], _2: Option[String]): (Option[String], Option[String])(scala.None, (value: String): Some[String]((userInfoEndpoint @ _))) => cats.syntax.`package`.bifunctor.toBifunctorOps[[A, B]cats.data.EitherT[scala.concurrent.Future,A,B], io.circe.Error, org.make.api.user.social.models.oidc.UserInfo](DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)))(data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))).leftWiden[Throwable] case _ => cats.data.EitherT.rightT[scala.concurrent.Future, Throwable].apply[org.make.api.user.social.models.oidc.UserInfo](jwtUserInfo)(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)) }.map[org.make.api.user.social.models.oidc.UserInfo](((userInfo: org.make.api.user.social.models.oidc.UserInfo) => userInfo))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
117 49610 4137 - 4137 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
117 47647 4121 - 4121 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
119 34771 4167 - 4167 Select akka.http.scaladsl.HttpExt.singleRequest$default$2 DefaultOpenIDConnectApi.this.http.singleRequest$default$2
119 47830 4167 - 4167 Select akka.http.scaladsl.HttpExt.singleRequest$default$3 DefaultOpenIDConnectApi.this.http.singleRequest$default$3
119 35816 4149 - 4757 Apply akka.http.scaladsl.HttpExt.singleRequest DefaultOpenIDConnectApi.this.http.singleRequest(akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.POST, model.this.Uri.apply(oidcConfiguration.tokenEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Content-Type", "application/x-www-form-urlencoded")).withEntity(akka.http.scaladsl.model.FormData.apply(scala.Predef.ArrowAssoc[String]("grant_type").->[String]("authorization_code"), scala.Predef.ArrowAssoc[String]("client_id").->[String](oidcConfiguration.clientId), scala.Predef.ArrowAssoc[String]("client_secret").->[String](clientSecret), scala.Predef.ArrowAssoc[String]("redirect_uri").->[String](redirectUri), scala.Predef.ArrowAssoc[String]("code").->[String](authorizationCode)).toEntity), DefaultOpenIDConnectApi.this.http.singleRequest$default$2, DefaultOpenIDConnectApi.this.http.singleRequest$default$3, DefaultOpenIDConnectApi.this.http.singleRequest$default$4)
119 44701 4167 - 4167 Select akka.http.scaladsl.HttpExt.singleRequest$default$4 DefaultOpenIDConnectApi.this.http.singleRequest$default$4
120 36356 4241 - 4272 Select org.make.core.operation.OidcConfiguration.tokenEndpoint oidcConfiguration.tokenEndpoint
120 41523 4196 - 4196 Select akka.http.scaladsl.model.HttpRequest.apply$default$3 akka.http.scaladsl.model.HttpRequest.apply$default$3
120 37363 4196 - 4196 Select akka.http.scaladsl.model.HttpRequest.apply$default$4 akka.http.scaladsl.model.HttpRequest.apply$default$4
120 49657 4241 - 4272 ApplyImplicitView akka.http.scaladsl.model.Uri.apply model.this.Uri.apply(oidcConfiguration.tokenEndpoint)
120 44163 4217 - 4233 Select akka.http.scaladsl.model.HttpMethods.POST akka.http.scaladsl.model.HttpMethods.POST
120 50156 4196 - 4196 Select akka.http.scaladsl.model.HttpRequest.apply$default$5 akka.http.scaladsl.model.HttpRequest.apply$default$5
121 43157 4303 - 4365 Apply akka.http.scaladsl.model.headers.RawHeader.apply akka.http.scaladsl.model.headers.RawHeader.apply("Content-Type", "application/x-www-form-urlencoded")
122 42317 4196 - 4743 Apply akka.http.scaladsl.model.HttpRequest.withEntity akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.POST, model.this.Uri.apply(oidcConfiguration.tokenEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Content-Type", "application/x-www-form-urlencoded")).withEntity(akka.http.scaladsl.model.FormData.apply(scala.Predef.ArrowAssoc[String]("grant_type").->[String]("authorization_code"), scala.Predef.ArrowAssoc[String]("client_id").->[String](oidcConfiguration.clientId), scala.Predef.ArrowAssoc[String]("client_secret").->[String](clientSecret), scala.Predef.ArrowAssoc[String]("redirect_uri").->[String](redirectUri), scala.Predef.ArrowAssoc[String]("code").->[String](authorizationCode)).toEntity)
124 34734 4444 - 4480 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String]("grant_type").->[String]("authorization_code")
125 30823 4502 - 4513 Literal <nosymbol> "client_id"
125 35777 4502 - 4543 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String]("client_id").->[String](oidcConfiguration.clientId)
125 44662 4517 - 4543 Select org.make.core.operation.OidcConfiguration.clientId oidcConfiguration.clientId
126 49153 4565 - 4596 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String]("client_secret").->[String](clientSecret)
127 41282 4618 - 4647 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String]("redirect_uri").->[String](redirectUri)
128 37406 4669 - 4696 Apply scala.Predef.ArrowAssoc.-> scala.Predef.ArrowAssoc[String]("code").->[String](authorizationCode)
129 50197 4414 - 4725 Select akka.http.scaladsl.model.FormData.toEntity akka.http.scaladsl.model.FormData.apply(scala.Predef.ArrowAssoc[String]("grant_type").->[String]("authorization_code"), scala.Predef.ArrowAssoc[String]("client_id").->[String](oidcConfiguration.clientId), scala.Predef.ArrowAssoc[String]("client_secret").->[String](clientSecret), scala.Predef.ArrowAssoc[String]("redirect_uri").->[String](redirectUri), scala.Predef.ArrowAssoc[String]("code").->[String](authorizationCode)).toEntity
133 37914 4801 - 4801 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.strictToString$default$2 DefaultOpenIDConnectApi.this.strictToString$default$2
133 51258 4856 - 4856 Select org.make.api.user.social.OidcTokenResponse.decoder social.this.OidcTokenResponse.decoder
133 35013 4776 - 5921 ApplyToImplicitArgs cats.data.EitherT.flatMap cats.data.EitherT.apply[scala.concurrent.Future, io.circe.Error, org.make.api.user.social.OidcTokenResponse](DefaultOpenIDConnectApi.this.strictToString(tokenResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,org.make.api.user.social.OidcTokenResponse]](((x$6: String) => io.circe.parser.`package`.parse(x$6).flatMap[io.circe.Error, org.make.api.user.social.OidcTokenResponse](((x$7: io.circe.Json) => x$7.as[org.make.api.user.social.OidcTokenResponse](social.this.OidcTokenResponse.decoder)))))(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((tokenResponse: org.make.api.user.social.OidcTokenResponse) => cats.syntax.`package`.either.catsSyntaxEither[Throwable, org.make.api.user.social.models.oidc.UserInfo](pdi.jwt.JwtCirce.decodeJson(tokenResponse.id_token, clientSecret, scala.`package`.Seq.apply[pdi.jwt.JwtAlgorithm.RS512.type](pdi.jwt.JwtAlgorithm.RS512), pdi.jwt.JwtOptions.apply(false, pdi.jwt.JwtOptions.apply$default$2, pdi.jwt.JwtOptions.apply$default$3, pdi.jwt.JwtOptions.apply$default$4)).toEither.flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((x$8: io.circe.Json) => x$8.as[org.make.api.user.social.OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map[org.make.api.user.social.models.oidc.UserInfo](((x$9: org.make.api.user.social.OidcTokenPayload) => x$9.toUserInfo))))).toEitherT[scala.concurrent.Future](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((jwtUserInfo: org.make.api.user.social.models.oidc.UserInfo) => scala.Tuple2.apply[Option[String], Option[String]](jwtUserInfo.firstName, oidcConfiguration.userInfoEndpoint) match { case (_1: Option[String], _2: Option[String]): (Option[String], Option[String])(scala.None, (value: String): Some[String]((userInfoEndpoint @ _))) => cats.syntax.`package`.bifunctor.toBifunctorOps[[A, B]cats.data.EitherT[scala.concurrent.Future,A,B], io.circe.Error, org.make.api.user.social.models.oidc.UserInfo](DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)))(data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))).leftWiden[Throwable] case _ => cats.data.EitherT.rightT[scala.concurrent.Future, Throwable].apply[org.make.api.user.social.models.oidc.UserInfo](jwtUserInfo)(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)) }.map[org.make.api.user.social.models.oidc.UserInfo](((userInfo: org.make.api.user.social.models.oidc.UserInfo) => userInfo))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
133 51042 4790 - 4790 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
133 47866 4834 - 4834 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
133 43158 4790 - 4790 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
133 35230 4835 - 4876 Apply scala.util.Either.flatMap io.circe.parser.`package`.parse(x$6).flatMap[io.circe.Error, org.make.api.user.social.OidcTokenResponse](((x$7: io.circe.Json) => x$7.as[org.make.api.user.social.OidcTokenResponse](social.this.OidcTokenResponse.decoder)))
133 44743 4801 - 4877 ApplyToImplicitArgs scala.concurrent.Future.map DefaultOpenIDConnectApi.this.strictToString(tokenResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,org.make.api.user.social.OidcTokenResponse]](((x$6: String) => io.circe.parser.`package`.parse(x$6).flatMap[io.circe.Error, org.make.api.user.social.OidcTokenResponse](((x$7: io.circe.Json) => x$7.as[org.make.api.user.social.OidcTokenResponse](social.this.OidcTokenResponse.decoder)))))(DefaultOpenIDConnectApi.this.executor)
133 43113 4852 - 4875 ApplyToImplicitArgs io.circe.Json.as x$7.as[org.make.api.user.social.OidcTokenResponse](social.this.OidcTokenResponse.decoder)
134 33211 4887 - 5921 ApplyToImplicitArgs cats.data.EitherT.flatMap cats.syntax.`package`.either.catsSyntaxEither[Throwable, org.make.api.user.social.models.oidc.UserInfo](pdi.jwt.JwtCirce.decodeJson(tokenResponse.id_token, clientSecret, scala.`package`.Seq.apply[pdi.jwt.JwtAlgorithm.RS512.type](pdi.jwt.JwtAlgorithm.RS512), pdi.jwt.JwtOptions.apply(false, pdi.jwt.JwtOptions.apply$default$2, pdi.jwt.JwtOptions.apply$default$3, pdi.jwt.JwtOptions.apply$default$4)).toEither.flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((x$8: io.circe.Json) => x$8.as[org.make.api.user.social.OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map[org.make.api.user.social.models.oidc.UserInfo](((x$9: org.make.api.user.social.OidcTokenPayload) => x$9.toUserInfo))))).toEitherT[scala.concurrent.Future](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((jwtUserInfo: org.make.api.user.social.models.oidc.UserInfo) => scala.Tuple2.apply[Option[String], Option[String]](jwtUserInfo.firstName, oidcConfiguration.userInfoEndpoint) match { case (_1: Option[String], _2: Option[String]): (Option[String], Option[String])(scala.None, (value: String): Some[String]((userInfoEndpoint @ _))) => cats.syntax.`package`.bifunctor.toBifunctorOps[[A, B]cats.data.EitherT[scala.concurrent.Future,A,B], io.circe.Error, org.make.api.user.social.models.oidc.UserInfo](DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)))(data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))).leftWiden[Throwable] case _ => cats.data.EitherT.rightT[scala.concurrent.Future, Throwable].apply[org.make.api.user.social.models.oidc.UserInfo](jwtUserInfo)(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)) }.map[org.make.api.user.social.models.oidc.UserInfo](((userInfo: org.make.api.user.social.models.oidc.UserInfo) => userInfo))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
134 41112 4899 - 4899 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
134 49955 4899 - 4899 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
135 51297 4996 - 4996 Select pdi.jwt.JwtOptions.apply$default$2 pdi.jwt.JwtOptions.apply$default$2
135 36879 4933 - 4955 Select org.make.api.user.social.OidcTokenResponse.id_token tokenResponse.id_token
135 47780 4996 - 5025 Apply pdi.jwt.JwtOptions.apply pdi.jwt.JwtOptions.apply(false, pdi.jwt.JwtOptions.apply$default$2, pdi.jwt.JwtOptions.apply$default$3, pdi.jwt.JwtOptions.apply$default$4)
135 37955 5019 - 5024 Literal <nosymbol> false
135 49648 4975 - 4993 Select pdi.jwt.JwtAlgorithm.RS512 pdi.jwt.JwtAlgorithm.RS512
135 35269 4996 - 4996 Select pdi.jwt.JwtOptions.apply$default$4 pdi.jwt.JwtOptions.apply$default$4
135 42862 4996 - 4996 Select pdi.jwt.JwtOptions.apply$default$3 pdi.jwt.JwtOptions.apply$default$3
135 41779 4971 - 4994 Apply scala.collection.SeqFactory.Delegate.apply scala.`package`.Seq.apply[pdi.jwt.JwtAlgorithm.RS512.type](pdi.jwt.JwtAlgorithm.RS512)
137 36918 5066 - 5151 Apply scala.util.Either.map x$8.as[org.make.api.user.social.OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map[org.make.api.user.social.models.oidc.UserInfo](((x$9: org.make.api.user.social.OidcTokenPayload) => x$9.toUserInfo))
137 44496 5089 - 5132 Apply org.make.api.user.social.OidcTokenPayload.decoder OidcTokenPayload.decoder(oidcConfiguration)
137 49405 4902 - 5152 Apply scala.util.Either.flatMap pdi.jwt.JwtCirce.decodeJson(tokenResponse.id_token, clientSecret, scala.`package`.Seq.apply[pdi.jwt.JwtAlgorithm.RS512.type](pdi.jwt.JwtAlgorithm.RS512), pdi.jwt.JwtOptions.apply(false, pdi.jwt.JwtOptions.apply$default$2, pdi.jwt.JwtOptions.apply$default$3, pdi.jwt.JwtOptions.apply$default$4)).toEither.flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((x$8: io.circe.Json) => x$8.as[org.make.api.user.social.OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map[org.make.api.user.social.models.oidc.UserInfo](((x$9: org.make.api.user.social.OidcTokenPayload) => x$9.toUserInfo))))
138 33674 5173 - 5173 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
138 41819 5173 - 5173 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
139 36627 5190 - 5921 ApplyToImplicitArgs cats.data.EitherT.map scala.Tuple2.apply[Option[String], Option[String]](jwtUserInfo.firstName, oidcConfiguration.userInfoEndpoint) match { case (_1: Option[String], _2: Option[String]): (Option[String], Option[String])(scala.None, (value: String): Some[String]((userInfoEndpoint @ _))) => cats.syntax.`package`.bifunctor.toBifunctorOps[[A, B]cats.data.EitherT[scala.concurrent.Future,A,B], io.circe.Error, org.make.api.user.social.models.oidc.UserInfo](DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)))(data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))).leftWiden[Throwable] case _ => cats.data.EitherT.rightT[scala.concurrent.Future, Throwable].apply[org.make.api.user.social.models.oidc.UserInfo](jwtUserInfo)(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)) }.map[org.make.api.user.social.models.oidc.UserInfo](((userInfo: org.make.api.user.social.models.oidc.UserInfo) => userInfo))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
139 47609 5199 - 5199 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
139 40006 5199 - 5199 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
141 35055 5399 - 5399 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
141 47858 5399 - 5399 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
141 36876 5399 - 5399 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
141 43685 5331 - 5800 ApplyToImplicitArgs cats.data.EitherT.map DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
141 51051 5367 - 5393 Select org.make.api.user.social.OidcTokenResponse.access_token tokenResponse.access_token
141 49197 5399 - 5399 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
141 41071 5399 - 5399 ApplyToImplicitArgs cats.data.EitherTInstances1.catsDataBifunctorForEitherT data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
143 42900 5503 - 5511 Apply scala.collection.MapOps.get data.get(key)
144 35022 5537 - 5558 Select org.make.api.user.social.models.oidc.UserInfo.firstName jwtUserInfo.firstName
144 47818 5439 - 5559 Apply scala.Option.orElse oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName)
146 36130 5672 - 5698 Select org.make.api.user.social.models.oidc.UserInfo.externalUserId jwtUserInfo.externalUserId
146 49438 5611 - 5699 Apply scala.Option.orElse oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId)
146 43950 5655 - 5663 Apply scala.collection.MapOps.get data.get(key)
147 50499 5726 - 5726 Select org.make.api.user.social.models.oidc.UserInfo.copy$default$5 jwtUserInfo.copy$default$5
147 42660 5714 - 5786 Apply org.make.api.user.social.models.oidc.UserInfo.copy jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5)
147 33427 5726 - 5726 Select org.make.api.user.social.models.oidc.UserInfo.copy$default$4 jwtUserInfo.copy$default$4
147 41310 5726 - 5726 Select org.make.api.user.social.models.oidc.UserInfo.copy$default$1 jwtUserInfo.copy$default$1
148 33463 5331 - 5821 TypeApply cats.Bifunctor.Ops.leftWiden cats.syntax.`package`.bifunctor.toBifunctorOps[[A, B]cats.data.EitherT[scala.concurrent.Future,A,B], io.circe.Error, org.make.api.user.social.models.oidc.UserInfo](DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)))(data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))).leftWiden[Throwable]
149 34563 5842 - 5888 ApplyToImplicitArgs cats.data.EitherT.PurePartiallyApplied.apply cats.data.EitherT.rightT[scala.concurrent.Future, Throwable].apply[org.make.api.user.social.models.oidc.UserInfo](jwtUserInfo)(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))
149 43409 5875 - 5875 ApplyToImplicitArgs cats.Invariant.catsInstancesForFuture cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)
149 51002 5875 - 5875 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
151 35051 3931 - 6057 ApplyToImplicitArgs scala.concurrent.Future.flatMap cats.syntax.`package`.either.catsSyntaxEither[IllegalArgumentException, String](oidcConfiguration.clientSecret.toRight[IllegalArgumentException](new scala.`package`.IllegalArgumentException("Client secret is required"))).toEitherT[scala.concurrent.Future](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((clientSecret: String) => cats.data.EitherT.right[Nothing].apply[scala.concurrent.Future, akka.http.scaladsl.model.HttpResponse](DefaultOpenIDConnectApi.this.http.singleRequest(akka.http.scaladsl.model.HttpRequest.apply(akka.http.scaladsl.model.HttpMethods.POST, model.this.Uri.apply(oidcConfiguration.tokenEndpoint), akka.http.scaladsl.model.HttpRequest.apply$default$3, akka.http.scaladsl.model.HttpRequest.apply$default$4, akka.http.scaladsl.model.HttpRequest.apply$default$5).withHeaders(akka.http.scaladsl.model.headers.RawHeader.apply("Content-Type", "application/x-www-form-urlencoded")).withEntity(akka.http.scaladsl.model.FormData.apply(scala.Predef.ArrowAssoc[String]("grant_type").->[String]("authorization_code"), scala.Predef.ArrowAssoc[String]("client_id").->[String](oidcConfiguration.clientId), scala.Predef.ArrowAssoc[String]("client_secret").->[String](clientSecret), scala.Predef.ArrowAssoc[String]("redirect_uri").->[String](redirectUri), scala.Predef.ArrowAssoc[String]("code").->[String](authorizationCode)).toEntity), DefaultOpenIDConnectApi.this.http.singleRequest$default$2, DefaultOpenIDConnectApi.this.http.singleRequest$default$3, DefaultOpenIDConnectApi.this.http.singleRequest$default$4))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((tokenResponse: akka.http.scaladsl.model.HttpResponse) => cats.data.EitherT.apply[scala.concurrent.Future, io.circe.Error, org.make.api.user.social.OidcTokenResponse](DefaultOpenIDConnectApi.this.strictToString(tokenResponse, DefaultOpenIDConnectApi.this.strictToString$default$2).map[scala.util.Either[io.circe.Error,org.make.api.user.social.OidcTokenResponse]](((x$6: String) => io.circe.parser.`package`.parse(x$6).flatMap[io.circe.Error, org.make.api.user.social.OidcTokenResponse](((x$7: io.circe.Json) => x$7.as[org.make.api.user.social.OidcTokenResponse](social.this.OidcTokenResponse.decoder)))))(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((tokenResponse: org.make.api.user.social.OidcTokenResponse) => cats.syntax.`package`.either.catsSyntaxEither[Throwable, org.make.api.user.social.models.oidc.UserInfo](pdi.jwt.JwtCirce.decodeJson(tokenResponse.id_token, clientSecret, scala.`package`.Seq.apply[pdi.jwt.JwtAlgorithm.RS512.type](pdi.jwt.JwtAlgorithm.RS512), pdi.jwt.JwtOptions.apply(false, pdi.jwt.JwtOptions.apply$default$2, pdi.jwt.JwtOptions.apply$default$3, pdi.jwt.JwtOptions.apply$default$4)).toEither.flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((x$8: io.circe.Json) => x$8.as[org.make.api.user.social.OidcTokenPayload](OidcTokenPayload.decoder(oidcConfiguration)).map[org.make.api.user.social.models.oidc.UserInfo](((x$9: org.make.api.user.social.OidcTokenPayload) => x$9.toUserInfo))))).toEitherT[scala.concurrent.Future](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).flatMap[Throwable, org.make.api.user.social.models.oidc.UserInfo](((jwtUserInfo: org.make.api.user.social.models.oidc.UserInfo) => scala.Tuple2.apply[Option[String], Option[String]](jwtUserInfo.firstName, oidcConfiguration.userInfoEndpoint) match { case (_1: Option[String], _2: Option[String]): (Option[String], Option[String])(scala.None, (value: String): Some[String]((userInfoEndpoint @ _))) => cats.syntax.`package`.bifunctor.toBifunctorOps[[A, B]cats.data.EitherT[scala.concurrent.Future,A,B], io.circe.Error, org.make.api.user.social.models.oidc.UserInfo](DefaultOpenIDConnectApi.this.claimUserInfoData(userInfoEndpoint, tokenResponse.access_token).map[org.make.api.user.social.models.oidc.UserInfo](((data: Map[String,String]) => { val firstName: Option[String] = oidcConfiguration.jwtGivenNameAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.firstName); val externalUserId: Option[String] = oidcConfiguration.jwtUserIdAltField.flatMap[String](((key: String) => data.get(key))).orElse[String](jwtUserInfo.externalUserId); { <artifact> val x$1: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = firstName; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = externalUserId; <artifact> val x$3: String = jwtUserInfo.copy$default$1; <artifact> val x$4: Long = jwtUserInfo.copy$default$4; <artifact> val x$5: Long = jwtUserInfo.copy$default$5; jwtUserInfo.copy(x$3, x$1, x$2, x$4, x$5) } }))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)))(data.this.EitherT.catsDataBifunctorForEitherT[[+T]scala.concurrent.Future[T]](cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))).leftWiden[Throwable] case _ => cats.data.EitherT.rightT[scala.concurrent.Future, Throwable].apply[org.make.api.user.social.models.oidc.UserInfo](jwtUserInfo)(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)) }.map[org.make.api.user.social.models.oidc.UserInfo](((userInfo: org.make.api.user.social.models.oidc.UserInfo) => userInfo))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor))))(cats.this.Invariant.catsInstancesForFuture(DefaultOpenIDConnectApi.this.executor)).value.flatMap[org.make.api.user.social.models.oidc.UserInfo](((x0$1: Either[Throwable,org.make.api.user.social.models.oidc.UserInfo]) => x0$1 match { case (value: org.make.api.user.social.models.oidc.UserInfo): scala.util.Right[Throwable,org.make.api.user.social.models.oidc.UserInfo]((userInfo @ _)) => scala.concurrent.Future.successful[org.make.api.user.social.models.oidc.UserInfo](userInfo) case (value: Throwable): scala.util.Left[Throwable,org.make.api.user.social.models.oidc.UserInfo]((thr @ _)) => scala.concurrent.Future.failed[Nothing](thr) }))(DefaultOpenIDConnectApi.this.executor)
151 43197 5937 - 5937 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
152 33253 5971 - 5998 Apply scala.concurrent.Future.successful scala.concurrent.Future.successful[org.make.api.user.social.models.oidc.UserInfo](userInfo)
153 47061 6031 - 6049 Apply scala.concurrent.Future.failed scala.concurrent.Future.failed[Nothing](thr)
158 48111 6189 - 6231 Apply grizzled.slf4j.Logger.debug DefaultOpenIDConnectApi.this.logger.debug(("Server answered ".+(response): String))
162 40569 6366 - 6367 Literal <nosymbol> 2
162 41603 6365 - 6365 ApplyToImplicitArgs akka.stream.Materializer.matFromSystem stream.this.Materializer.matFromSystem(DefaultOpenIDConnectApiComponent.this.actorSystem)
162 49187 6365 - 6365 Select org.make.api.technical.ActorSystemComponent.actorSystem DefaultOpenIDConnectApiComponent.this.actorSystem
162 36707 6366 - 6374 Select scala.concurrent.duration.DurationConversions.second scala.concurrent.duration.`package`.DurationInt(2).second
163 43238 6392 - 6392 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
163 33162 6413 - 6437 Apply java.nio.charset.Charset.forName java.nio.charset.Charset.forName("UTF-8")
163 34803 6337 - 6439 ApplyToImplicitArgs scala.concurrent.Future.map entity.toStrict(scala.concurrent.duration.`package`.DurationInt(2).second)(stream.this.Materializer.matFromSystem(DefaultOpenIDConnectApiComponent.this.actorSystem)).map[String](((x$10: akka.http.scaladsl.model.HttpEntity.Strict) => x$10.data.decodeString(java.nio.charset.Charset.forName("UTF-8"))))(DefaultOpenIDConnectApi.this.executor)
163 47096 6393 - 6438 Apply akka.util.ByteString.decodeString x$10.data.decodeString(java.nio.charset.Charset.forName("UTF-8"))
166 39721 6532 - 6540 Select scala.concurrent.duration.DurationConversions.second scala.concurrent.duration.`package`.DurationInt(2).second
166 48151 6532 - 6533 Literal <nosymbol> 2
166 48664 6516 - 6764 ApplyToImplicitArgs scala.concurrent.Future.flatMap entity.toStrict(scala.concurrent.duration.`package`.DurationInt(2).second)(stream.this.Materializer.matFromSystem(DefaultOpenIDConnectApiComponent.this.actorSystem)).flatMap[Nothing](((entity: akka.http.scaladsl.model.HttpEntity.Strict) => { val response: String = entity.data.decodeString(java.nio.charset.Charset.forName("UTF-8")); scala.concurrent.Future.failed[Nothing](SocialProviderException.apply(("Got unexpected response code: ".+(code).+(", with body: ").+(response): String))) }))(DefaultOpenIDConnectApi.this.executor)
166 49223 6531 - 6531 ApplyToImplicitArgs akka.stream.Materializer.matFromSystem stream.this.Materializer.matFromSystem(DefaultOpenIDConnectApiComponent.this.actorSystem)
166 34844 6550 - 6550 Select org.make.api.user.social.DefaultOpenIDConnectApiComponent.DefaultOpenIDConnectApi.executor DefaultOpenIDConnectApi.this.executor
166 36461 6531 - 6531 Select org.make.api.technical.ActorSystemComponent.actorSystem DefaultOpenIDConnectApiComponent.this.actorSystem
167 41359 6614 - 6638 Apply java.nio.charset.Charset.forName java.nio.charset.Charset.forName("UTF-8")
167 33202 6589 - 6639 Apply akka.util.ByteString.decodeString entity.data.decodeString(java.nio.charset.Charset.forName("UTF-8"))
168 46542 6666 - 6751 Apply org.make.api.user.social.SocialProviderException.apply SocialProviderException.apply(("Got unexpected response code: ".+(code).+(", with body: ").+(response): String))
168 42441 6652 - 6752 Apply scala.concurrent.Future.failed scala.concurrent.Future.failed[Nothing](SocialProviderException.apply(("Got unexpected response code: ".+(code).+(", with body: ").+(response): String)))