diff --git a/app/services/UserInfoService.scala b/app/services/UserInfoService.scala index b50576c..3ee3716 100644 --- a/app/services/UserInfoService.scala +++ b/app/services/UserInfoService.scala @@ -41,7 +41,7 @@ class LiveUserInfoService @Inject() ( override def fetchUserInfo(version: Version)(implicit hc: HeaderCarrier): Future[UserInfo] = { val accessTokenHeaderName = "X-Client-Authorization-Token" - val accessTokenHeader = hc.otherHeaders.find(x => x._1 == "X-Client-Authorization-Token") + val accessTokenHeader = hc.otherHeaders.find(x => x._1 == accessTokenHeaderName) val scopes = accessTokenHeader match { case Some(accessTokenHeader) => thirdPartyDelegatedAuthorityConnector.fetchScopes(accessTokenHeader._2)