diff --git a/README.md b/README.md
index e52260e..2afdf9b 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,15 @@ User details data structures follow the OpenId Connect UserInfo specification (s
You can dive deeper into the documentation in the [API Developer Hub](https://developer.service.hmrc.gov.uk/api-documentation/docs/api#openid-connect-userinfo).
+## Deprecated Class Usage
+You can find the deprecation suppression `@nowarn("cat=deprecation")` in the code in few places.
+
+The reason is that when the latest `v2.Retrievals` was used then the integration tests were broken and wasn't obvious why.
+
## Running Locally
Run the service `sbt run -Drun.mode=Dev`
-Run the tests & test coverage report `sbt clean compile coverage test it:test coverageReport`
+Run the tests & test coverage report `sbt clean coverage test it/test coverageReport`
Run the service in service manager; if you want live endpoints, then start dependencies thus: `sm2 --start AUTH DATASTREAM -r`
diff --git a/app/config/APIAccessConfig.scala b/app/config/APIAccessConfig.scala
index 9e3dd7e..405942e 100644
--- a/app/config/APIAccessConfig.scala
+++ b/app/config/APIAccessConfig.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/config/AppContext.scala b/app/config/AppContext.scala
index 9c96ff9..53ba0a0 100644
--- a/app/config/AppContext.scala
+++ b/app/config/AppContext.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/config/FeatureSwitch.scala b/app/config/FeatureSwitch.scala
index 8dd51b9..227c326 100644
--- a/app/config/FeatureSwitch.scala
+++ b/app/config/FeatureSwitch.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/config/GuiceModule.scala b/app/config/GuiceModule.scala
index 91966af..1137889 100644
--- a/app/config/GuiceModule.scala
+++ b/app/config/GuiceModule.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,8 @@ import services.{LiveUserInfoService, SandboxUserInfoService, UserInfoService}
import uk.gov.hmrc.play.bootstrap.http.DefaultHttpClient
import uk.gov.hmrc.play.bootstrap.config.ControllerConfig
+import scala.annotation.unused
+
class GuiceModule(val environment: Environment, val configuration: Configuration) extends AbstractModule {
override def configure() = {
bind(classOf[AuthConnector]).to(classOf[AuthConnectorV1])
@@ -36,6 +38,7 @@ class GuiceModule(val environment: Environment, val configuration: Configuration
bind(classOf[HttpGet]).to(classOf[DefaultHttpClient])
bind(classOf[ControllerConfig]).toInstance {
new ControllerConfig {
+ @unused
def controllerConfigs: Config = configuration.underlying.getConfig("controllers")
}
}
diff --git a/app/connectors/AuthConnector.scala b/app/connectors/AuthConnector.scala
index 3fa0524..01ae571 100644
--- a/app/connectors/AuthConnector.scala
+++ b/app/connectors/AuthConnector.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,17 +17,18 @@
package connectors
import javax.inject.{Inject, Singleton}
-
-import com.github.ghik.silencer.silent
-import uk.gov.hmrc.auth.core.retrieve.{Retrievals, ~}
+import uk.gov.hmrc.auth.core.retrieve.Retrievals
+import uk.gov.hmrc.auth.core.retrieve.~
import uk.gov.hmrc.auth.core.{AuthorisedFunctions, Enrolments, PlayAuthConnector}
import uk.gov.hmrc.http.{CorePost, HeaderCarrier, NotFoundException}
import domain.{Authority, DesUserInfo, UserDetails}
import config.AppContext
+import scala.annotation.nowarn
import scala.concurrent.{ExecutionContext, Future}
-@silent abstract class AuthConnector extends PlayAuthConnector with AuthorisedFunctions {
+@nowarn("cat=deprecation")
+abstract class AuthConnector extends PlayAuthConnector with AuthorisedFunctions {
self: UserDetailsFetcher =>
val appContext: AppContext
@@ -41,7 +42,7 @@ import scala.concurrent.{ExecutionContext, Future}
.retrieve(Retrievals.allEnrolments) { enrolments =>
Future.successful(Some(enrolments))
}
- .recover { case e: NotFoundException =>
+ .recover { case _: NotFoundException =>
None
}
}
@@ -52,7 +53,7 @@ import scala.concurrent.{ExecutionContext, Future}
case credentials ~ nino => Future.successful(Some(Authority(credentials.providerId, nino)))
case _ => Future.successful(None)
}
- .recover { case e: NotFoundException =>
+ .recover { case _: NotFoundException =>
None
}
}
@@ -67,7 +68,7 @@ import scala.concurrent.{ExecutionContext, Future}
Future.successful(Some(DesUserInfo(name, dateOfBirth, address)))
case _ => nothing
}
- .recoverWith { case ex: NotFoundException =>
+ .recoverWith { case _: NotFoundException =>
nothing
}
}
diff --git a/app/connectors/AuthV1UserDetailsFetcher.scala b/app/connectors/AuthV1UserDetailsFetcher.scala
index b4bb0f1..9b70da1 100644
--- a/app/connectors/AuthV1UserDetailsFetcher.scala
+++ b/app/connectors/AuthV1UserDetailsFetcher.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,17 @@
package connectors
-import com.github.ghik.silencer.silent
import uk.gov.hmrc.auth.core.AuthorisedFunctions
-import uk.gov.hmrc.auth.core.retrieve.{Retrievals, ~}
+import uk.gov.hmrc.auth.core.retrieve.Retrievals
+import uk.gov.hmrc.auth.core.retrieve.~
import uk.gov.hmrc.http.{HeaderCarrier, NotFoundException}
import domain.UserDetails
+import scala.annotation.nowarn
import scala.concurrent.{ExecutionContext, Future}
-@silent trait AuthV1UserDetailsFetcher extends UserDetailsFetcher {
+@nowarn("cat=deprecation")
+trait AuthV1UserDetailsFetcher extends UserDetailsFetcher {
self: AuthorisedFunctions =>
def fetchDetails()(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Option[UserDetails]] = {
@@ -58,7 +60,7 @@ import scala.concurrent.{ExecutionContext, Future}
)
case _ => Future.successful(None)
}
- .recover { case e: NotFoundException =>
+ .recover { case _: NotFoundException =>
None
}
}
diff --git a/app/connectors/ThirdPartyDelegatedAuthorityConnector.scala b/app/connectors/ThirdPartyDelegatedAuthorityConnector.scala
index eebf7e7..5a512d9 100644
--- a/app/connectors/ThirdPartyDelegatedAuthorityConnector.scala
+++ b/app/connectors/ThirdPartyDelegatedAuthorityConnector.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,13 @@
package connectors
-import javax.inject.{Inject, Singleton}
-import play.api.http.Status
-
-import scala.concurrent.{ExecutionContext, Future}
-import uk.gov.hmrc.http.{HeaderCarrier, HttpGet, HttpResponse, NotFoundException}
import config.AppContext
+import play.api.http.Status
import uk.gov.hmrc.http.HttpReads.Implicits.readRaw
+import uk.gov.hmrc.http.{HeaderCarrier, HttpGet}
-import scala.util.control.NonFatal
+import javax.inject.{Inject, Singleton}
+import scala.concurrent.{ExecutionContext, Future}
@Singleton
class ThirdPartyDelegatedAuthorityConnector @Inject() (appContext: AppContext, http: HttpGet) {
diff --git a/app/connectors/UserDetailsFetcher.scala b/app/connectors/UserDetailsFetcher.scala
index 7f64076..73bc9a5 100644
--- a/app/connectors/UserDetailsFetcher.scala
+++ b/app/connectors/UserDetailsFetcher.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/controllers/DocumentationController.scala b/app/controllers/DocumentationController.scala
index 7aca459..11e1f2a 100644
--- a/app/controllers/DocumentationController.scala
+++ b/app/controllers/DocumentationController.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,8 +22,6 @@ import play.api.mvc.{Action, AnyContent, ControllerComponents}
import config.{APIAccessVersions, AppContext}
import views._
-import scala.language.dynamics
-
@Singleton
class DocumentationController @Inject() (errorHandler: HttpErrorHandler, appContext: AppContext, assets: Assets, cc: ControllerComponents)
extends uk.gov.hmrc.api.controllers.DocumentationController(cc, assets, errorHandler) {
diff --git a/app/controllers/ErrorResponses.scala b/app/controllers/ErrorResponses.scala
index 449ffe6..8fb6840 100644
--- a/app/controllers/ErrorResponses.scala
+++ b/app/controllers/ErrorResponses.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/controllers/UserInfoController.scala b/app/controllers/UserInfoController.scala
index a205fe4..a8b8adf 100644
--- a/app/controllers/UserInfoController.scala
+++ b/app/controllers/UserInfoController.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/controllers/package.scala b/app/controllers/package.scala
index b84cd50..59bfc4a 100644
--- a/app/controllers/package.scala
+++ b/app/controllers/package.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,18 +14,16 @@
* limitations under the License.
*/
-import play.api.libs.json.{JsValue, Json, Writes}
+import play.api.libs.json.{Json, Writes}
package object controllers {
- def errorWrites[T <: ErrorResponse] = new Writes[T] {
- override def writes(o: T): JsValue = Json.obj("code" -> o.errorCode, "message" -> o.message)
- }
+ private def errorWrites[T <: ErrorResponse]: Writes[T] = (o: T) => Json.obj("code" -> o.errorCode, "message" -> o.message)
- implicit val errorResponseWrites = errorWrites[ErrorResponse]
- implicit val errorUnauthorizedWrites = errorWrites[ErrorUnauthorized]
- implicit val errorNotFoundWrites = errorWrites[ErrorNotFound]
- implicit val errorAcceptHeaderInvalidWrites = errorWrites[ErrorAcceptHeaderInvalid]
- implicit val errorBadGatewayWrites = errorWrites[ErrorBadGateway]
- implicit val errorBadRequestWrites = errorWrites[ErrorBadRequest]
+ implicit val errorResponseWrites: Writes[ErrorResponse] = errorWrites[ErrorResponse]
+ implicit val errorUnauthorizedWrites: Writes[ErrorUnauthorized] = errorWrites[ErrorUnauthorized]
+ implicit val errorNotFoundWrites: Writes[ErrorNotFound] = errorWrites[ErrorNotFound]
+ implicit val errorAcceptHeaderInvalidWrites: Writes[ErrorAcceptHeaderInvalid] = errorWrites[ErrorAcceptHeaderInvalid]
+ implicit val errorBadGatewayWrites: Writes[ErrorBadGateway] = errorWrites[ErrorBadGateway]
+ implicit val errorBadRequestWrites: Writes[ErrorBadRequest] = errorWrites[ErrorBadRequest]
}
diff --git a/app/controllers/testOnly/FeatureSwitchController.scala b/app/controllers/testOnly/FeatureSwitchController.scala
index b235e23..641903c 100644
--- a/app/controllers/testOnly/FeatureSwitchController.scala
+++ b/app/controllers/testOnly/FeatureSwitchController.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/data/UserInfoGenerator.scala b/app/data/UserInfoGenerator.scala
index 0707412..744624a 100644
--- a/app/data/UserInfoGenerator.scala
+++ b/app/data/UserInfoGenerator.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -141,7 +141,7 @@ class UserInfoGenerator {
private def formattedNino = {
val first = ninoPrefixGenerator.getOrElse("")
val second = ninoPrefixGenerator.getOrElse("")
- val number = numbersGenerator.getOrElse("")
+ val number = numbersGenerator.map(_.toString).getOrElse("")
val suffix = ninoSuffixGenerator.getOrElse("")
s"$first$second$number$suffix"
}
diff --git a/app/domain/APIDefinition.scala b/app/domain/APIDefinition.scala
index a196738..0ccf982 100644
--- a/app/domain/APIDefinition.scala
+++ b/app/domain/APIDefinition.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/Authority.scala b/app/domain/Authority.scala
index 9effd49..cc8045a 100644
--- a/app/domain/Authority.scala
+++ b/app/domain/Authority.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/Enrolment.scala b/app/domain/Enrolment.scala
index e166c6a..585b4f4 100644
--- a/app/domain/Enrolment.scala
+++ b/app/domain/Enrolment.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/GovernmentGatewayDetails.scala b/app/domain/GovernmentGatewayDetails.scala
index 27c484a..5469f73 100644
--- a/app/domain/GovernmentGatewayDetails.scala
+++ b/app/domain/GovernmentGatewayDetails.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/NinoNotFoundException.scala b/app/domain/NinoNotFoundException.scala
index 73af98b..9cf98a8 100644
--- a/app/domain/NinoNotFoundException.scala
+++ b/app/domain/NinoNotFoundException.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/UserDetails.scala b/app/domain/UserDetails.scala
index 17c8ae9..47cf5c9 100644
--- a/app/domain/UserDetails.scala
+++ b/app/domain/UserDetails.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/UserInfo.scala b/app/domain/UserInfo.scala
index 57144da..ee7afe3 100644
--- a/app/domain/UserInfo.scala
+++ b/app/domain/UserInfo.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/domain/package.scala b/app/domain/package.scala
index 5fb48bb..0408025 100644
--- a/app/domain/package.scala
+++ b/app/domain/package.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,21 +20,21 @@ import uk.gov.hmrc.auth.core.{Enrolment, EnrolmentIdentifier}
package object domain {
- implicit val desUserName = Json.format[ItmpName]
+ implicit val desUserName: OFormat[ItmpName] = Json.format
- implicit val desAddress = Json.format[ItmpAddress]
+ implicit val desAddress: OFormat[ItmpAddress] = Json.format
- implicit val enrolmentIdentifier = Json.format[EnrolmentIdentifier]
- implicit val enrloment = Json.format[Enrolment]
+ implicit val enrolmentIdentifier: OFormat[EnrolmentIdentifier] = Json.format
+ implicit val enrloment: OFormat[Enrolment] = Json.format
- implicit val gatewayInformationFmt: Format[GatewayInformation] = Json.format[GatewayInformation]
- implicit val mdtpInformationFmt: Format[MdtpInformation] = Json.format[MdtpInformation]
- implicit val userDetails = Json.format[UserDetails]
- implicit val mdtp = Json.format[Mdtp]
- implicit val governmentGatewayDetails = Json.format[GovernmentGatewayDetails]
+ implicit val gatewayInformationFmt: Format[GatewayInformation] = Json.format
+ implicit val mdtpInformationFmt: Format[MdtpInformation] = Json.format
+ implicit val userDetails: OFormat[UserDetails] = Json.format
+ implicit val mdtp: OFormat[Mdtp] = Json.format
+ implicit val governmentGatewayDetails: OFormat[GovernmentGatewayDetails] = Json.format
- implicit val addressFmt = Json.format[Address]
- implicit val userInfoFmt = Json.format[UserInfo]
- implicit val apiAccessFmt = Json.format[APIAccess]
+ implicit val addressFmt: OFormat[Address] = Json.format
+ implicit val userInfoFmt: OFormat[UserInfo] = Json.format
+ implicit val apiAccessFmt: OFormat[APIAccess] = Json.format
}
diff --git a/app/filters/MicroserviceAuthFilter.scala b/app/filters/MicroserviceAuthFilter.scala
index 13fe40a..c715d65 100644
--- a/app/filters/MicroserviceAuthFilter.scala
+++ b/app/filters/MicroserviceAuthFilter.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/filters/MicroserviceFilters.scala b/app/filters/MicroserviceFilters.scala
index 71083b1..863f1ba 100644
--- a/app/filters/MicroserviceFilters.scala
+++ b/app/filters/MicroserviceFilters.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,13 +17,13 @@
package filters
import javax.inject.{Inject, Singleton}
-import com.kenshoo.play.metrics.MetricsFilter
import play.api.http.DefaultHttpFilters
import uk.gov.hmrc.play.bootstrap.filters.{AuditFilter, CacheControlFilter, LoggingFilter, MDCFilter}
+import uk.gov.hmrc.play.bootstrap.metrics.MetricsFilterImpl
@Singleton
class MicroserviceFilters @Inject() (
- metricsFilter: MetricsFilter,
+ metricsFilter: MetricsFilterImpl,
auditFilter: AuditFilter,
loggingFilter: LoggingFilter,
cacheFilter: CacheControlFilter,
diff --git a/app/handlers/ErrorHandler.scala b/app/handlers/ErrorHandler.scala
index c4888e5..524641e 100644
--- a/app/handlers/ErrorHandler.scala
+++ b/app/handlers/ErrorHandler.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/app/services/UserInfoService.scala b/app/services/UserInfoService.scala
index d65ed87..c8a39ab 100644
--- a/app/services/UserInfoService.scala
+++ b/app/services/UserInfoService.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,14 @@
package services
-import javax.inject.{Inject, Named, Singleton}
-import uk.gov.hmrc.auth.core.Enrolments
-import uk.gov.hmrc.http.Authorization
-import uk.gov.hmrc.http.{BadRequestException, HeaderCarrier, UnauthorizedException}
import connectors._
import controllers.{Version, Version_1_0}
import data.UserInfoGenerator
import domain._
+import uk.gov.hmrc.auth.core.Enrolments
+import uk.gov.hmrc.http.{BadRequestException, HeaderCarrier, UnauthorizedException}
+import javax.inject.{Inject, Singleton}
import scala.concurrent.{ExecutionContext, Future}
trait UserInfoService {
diff --git a/app/services/UserInfoTransformer.scala b/app/services/UserInfoTransformer.scala
index 8a8c3ea..0f7d691 100644
--- a/app/services/UserInfoTransformer.scala
+++ b/app/services/UserInfoTransformer.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ class UserInfoTransformer {
val agentFriendlyName = userDetails flatMap { _.agentFriendlyName }
val agentId = userDetails flatMap { _.agentId }
val gatewayInformation = userDetails flatMap { _.gatewayInformation }
- val mdtp = userDetails flatMap { _.mdtpInformation }
+// val mdtp = userDetails flatMap { _.mdtpInformation }
val profileUrl = userDetails flatMap { _.profile }
val groupProfileUrl = userDetails flatMap { _.groupProfile }
diff --git a/build.sbt b/build.sbt
index b0e9d8e..a4b3bc6 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,23 +1,36 @@
import play.sbt.PlayImport.PlayKeys.playDefaultPort
-import uk.gov.hmrc.DefaultBuildSettings.integrationTestSettings
+import sbt.Keys.scalacOptions
+import uk.gov.hmrc.DefaultBuildSettings
+
+import scala.collection.Seq
val appName = "openid-connect-userinfo"
+ThisBuild / majorVersion := 1
+ThisBuild / scalaVersion := "2.13.12"
+ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always // it should not be needed but the build still fails without it
lazy val microservice = Project(appName, file("."))
- .enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin)
+ .enablePlugins(PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin) // Required to prevent https://github.com/scalatest/scalatest/issues/1427
- .settings(scalaVersion := "2.13.8")
- .settings(scalacOptions := Seq("-Xfatal-warnings", "-feature", "-deprecation"))
.settings(
- majorVersion := 0,
- libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test
+ playDefaultPort := 9836,
+ libraryDependencies ++= AppDependencies(),
+ scalacOptions ++= Seq(
+ "-Werror",
+ "-feature",
+ "-Wconf:cat=unused-imports&src=views/.*:s",
+ "-Wconf:src=routes/.*:s"
+ )
)
- .configs(IntegrationTest)
- .settings(integrationTestSettings() *)
- .settings(IntegrationTest / dependencyClasspath ++= (Test / exportedProducts).value)
- .settings(IntegrationTest / unmanagedResourceDirectories += baseDirectory.value / "it" / "resources")
- .settings(resolvers += Resolver.jcenterRepo)
- .settings(playDefaultPort := 9836)
.settings(ScoverageSettings())
- .settings(SilencerSettings())
.settings(scalafmtOnCompile := true)
+
+lazy val it = project
+ .enablePlugins(PlayScala)
+ .dependsOn(microservice % "test->test") // the "test->test" allows reusing test code and test dependencies
+ .settings(DefaultBuildSettings.itSettings())
+ .settings(Test / unmanagedResourceDirectories += baseDirectory.value / "test" / "resources")
+ .settings(
+ Test / parallelExecution := false,
+ Test / fork := false
+ )
diff --git a/conf/application-json-logger.xml b/conf/application-json-logger.xml
index f3099c6..c8069a2 100644
--- a/conf/application-json-logger.xml
+++ b/conf/application-json-logger.xml
@@ -5,9 +5,9 @@
-
+
-
+
diff --git a/conf/application.conf b/conf/application.conf
index 92927a2..a330e67 100644
--- a/conf/application.conf
+++ b/conf/application.conf
@@ -1,4 +1,4 @@
-# Copyright 2023 HM Revenue & Customs
+# Copyright 2024 HM Revenue & Customs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,14 +18,8 @@ include "backend.conf"
appName = openid-connect-userinfo
-# Provides an implementation of AuditConnector. Use `uk.gov.hmrc.play.bootstrap.AuditModule` or create your own.
-# An audit connector must be provided.
-play.modules.enabled += "uk.gov.hmrc.play.audit.AuditModule"
-
# Provides an implementation of MetricsFilter. Use `uk.gov.hmrc.play.bootstrap.graphite.GraphiteMetricsModule` or create your own.
# A metric filter must be provided
-play.modules.enabled += "uk.gov.hmrc.play.bootstrap.graphite.GraphiteMetricsModule"
-play.modules.enabled += "uk.gov.hmrc.play.bootstrap.backend.BackendModule"
play.modules.enabled += "uk.gov.hmrc.play.bootstrap.AuthModule"
play.modules.enabled += "config.GuiceModule"
@@ -65,6 +59,9 @@ play.http.router = prod.Routes
# DES API endpoint
des.individual.endpoint = /pay-as-you-earn/02.00.00/individuals/
+feature.addressLine5 = false
+feature.countryCode = false
+
# Controller
# ~~~~~
# By default all controllers will have authorisation, logging and
@@ -74,12 +71,6 @@ des.individual.endpoint = /pay-as-you-earn/02.00.00/individuals/
controllers {
confidenceLevel = 50
- com.kenshoo.play.metrics.MetricsController = {
- needsAuth = false
- needsLogging = false
- needsAuditing = false
- }
-
controllers.DocumentationController = {
needsAuth = false
needsLogging = true
@@ -144,17 +135,6 @@ api.access {
allow-list.applicationIds = []
}
-auditing {
- enabled = false
-
- consumer {
- baseUri {
- host = localhost
- port = 8100
- }
- }
-}
-
microservice {
services {
diff --git a/conf/prod.routes b/conf/prod.routes
index 187ed2d..24d3c12 100644
--- a/conf/prod.routes
+++ b/conf/prod.routes
@@ -1,9 +1,7 @@
# Add all the application routes to the app.routes file
--> /sandbox sandbox.Routes
--> / live.Routes
+-> /sandbox sandbox.Routes
+-> / live.Routes
--> / health.Routes
--> / definition.Routes
-
-GET /admin/metrics @com.kenshoo.play.metrics.MetricsController.metrics
\ No newline at end of file
+-> / health.Routes
+-> / definition.Routes
diff --git a/conf/testOnlyDoNotUseInAppConf.routes b/conf/testOnlyDoNotUseInAppConf.routes
index b2aeb71..bd6ee64 100644
--- a/conf/testOnlyDoNotUseInAppConf.routes
+++ b/conf/testOnlyDoNotUseInAppConf.routes
@@ -1,4 +1,4 @@
-GET /feature-switches @controllers.testOnly.FeatureSwitchController.getFlags
-POST /feature-switches @controllers.testOnly.FeatureSwitchController.setFlags
+GET /test-only/feature-switches @controllers.testOnly.FeatureSwitchController.getFlags
+POST /test-only/feature-switches @controllers.testOnly.FeatureSwitchController.setFlags
--> / prod.Routes
\ No newline at end of file
+-> / prod.Routes
\ No newline at end of file
diff --git a/it/BaseFeatureISpec.scala b/it/test/BaseFeatureISpec.scala
similarity index 85%
rename from it/BaseFeatureISpec.scala
rename to it/test/BaseFeatureISpec.scala
index cc913d7..b3f8f38 100644
--- a/it/BaseFeatureISpec.scala
+++ b/it/test/BaseFeatureISpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,8 +75,20 @@ trait BaseFeatureISpec
val stubPort: Int = sys.env.getOrElse("WIREMOCK_SERVICE_LOCATOR_PORT", "6008").toInt
val wireMockServer = new WireMockServer(wireMockConfig().port(stubPort))
- wireMockServer.start()
- WireMock.configureFor(stubHost, stubPort)
- stubFor(post(urlPathMatching("/registration")).willReturn(aResponse().withStatus(204)))
+ override def beforeAll(): Unit = {
+ super.beforeAll()
+ wireMockServer.start()
+ WireMock.configureFor(stubHost, stubPort)
+ stubFor(post(urlPathMatching("/registration")).willReturn(aResponse().withStatus(204)))
+ }
+
+ override def afterAll(): Unit = {
+ super.afterAll()
+ wireMockServer.stop()
+ }
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ wireMockServer.resetMappings()
+ }
}
diff --git a/it/FeatureSwitchControllerISpec.scala b/it/test/FeatureSwitchControllerISpec.scala
similarity index 88%
rename from it/FeatureSwitchControllerISpec.scala
rename to it/test/FeatureSwitchControllerISpec.scala
index e212d8f..4d68650 100644
--- a/it/FeatureSwitchControllerISpec.scala
+++ b/it/test/FeatureSwitchControllerISpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,11 +19,11 @@ import scalaj.http.Http
class FeatureSwitchControllerISpec extends BaseFeatureISpec {
- val serviceUrl = "/feature-switches"
+ val serviceUrl = "/test-only/feature-switches"
Feature("getting feature switches") {
- Scenario("calling GET /feature-switches") {
- Given("we call GET /feature-switches")
+ Scenario("calling GET /test-only/feature-switches") {
+ Given("we call GET /test-only/feature-switches")
val result = Http(resource(s"$serviceUrl")).asString
@@ -37,8 +37,8 @@ class FeatureSwitchControllerISpec extends BaseFeatureISpec {
}
Feature("updating feature switches") {
- Scenario("calling POST /feature-switches") {
- Given("we call GET /feature-switches")
+ Scenario("calling POST /test-only/feature-switches") {
+ Given("we call GET /test-only/feature-switches")
val result = Http(resource(s"$serviceUrl")).asString
diff --git a/it/SchemaISpec.scala b/it/test/SchemaISpec.scala
similarity index 97%
rename from it/SchemaISpec.scala
rename to it/test/SchemaISpec.scala
index 309a073..fb0cac3 100644
--- a/it/SchemaISpec.scala
+++ b/it/test/SchemaISpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/it/UserInfoServiceISpec.scala b/it/test/UserInfoServiceISpec.scala
similarity index 99%
rename from it/UserInfoServiceISpec.scala
rename to it/test/UserInfoServiceISpec.scala
index 3a04cd5..a60bee3 100644
--- a/it/UserInfoServiceISpec.scala
+++ b/it/test/UserInfoServiceISpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@ import com.github.fge.jsonschema.core.report.LogLevel
import com.github.fge.jsonschema.main.JsonSchemaFactory
import config.{FeatureSwitch, UserInfoFeatureSwitches}
import domain._
+
import java.time.LocalDate
import play.api.libs.json.Json
import scalaj.http.{Http, HttpOptions}
@@ -28,12 +29,9 @@ import uk.gov.hmrc.auth.core._
import uk.gov.hmrc.auth.core.retrieve._
import uk.gov.hmrc.domain.Nino
-class UserInfoServiceISpec extends BaseFeatureISpec with AuthStub with ThirdPartyDelegatedAuthorityStub {
+import scala.jdk.CollectionConverters.CollectionHasAsScala
- override protected def beforeEach(): Unit = {
- super.beforeEach()
- wireMockServer.resetMappings()
- }
+class UserInfoServiceISpec extends BaseFeatureISpec with AuthStub with ThirdPartyDelegatedAuthorityStub {
override def beforeAll(): Unit = {
super.beforeAll()
diff --git a/it/resources/1.0/examples/get-user-info-example-1.json b/it/test/resources/1.0/examples/get-user-info-example-1.json
similarity index 100%
rename from it/resources/1.0/examples/get-user-info-example-1.json
rename to it/test/resources/1.0/examples/get-user-info-example-1.json
diff --git a/it/resources/1.0/schemas/userinfo.json b/it/test/resources/1.0/schemas/userinfo.json
similarity index 100%
rename from it/resources/1.0/schemas/userinfo.json
rename to it/test/resources/1.0/schemas/userinfo.json
diff --git a/it/resources/1.1/examples/get-user-info-example-1.json b/it/test/resources/1.1/examples/get-user-info-example-1.json
similarity index 100%
rename from it/resources/1.1/examples/get-user-info-example-1.json
rename to it/test/resources/1.1/examples/get-user-info-example-1.json
diff --git a/it/resources/1.1/schemas/userinfo.json b/it/test/resources/1.1/schemas/userinfo.json
similarity index 100%
rename from it/resources/1.1/schemas/userinfo.json
rename to it/test/resources/1.1/schemas/userinfo.json
diff --git a/it/stubs/AuthStub.scala b/it/test/stubs/AuthStub.scala
similarity index 95%
rename from it/stubs/AuthStub.scala
rename to it/test/stubs/AuthStub.scala
index 34b834d..05e20ae 100644
--- a/it/stubs/AuthStub.scala
+++ b/it/test/stubs/AuthStub.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,14 +20,16 @@ import com.github.tomakehurst.wiremock.client.WireMock._
import play.api.libs.json._
import play.api.libs.json.Writes.DefaultLocalDateWrites
import uk.gov.hmrc.auth.core.retrieve._
-import uk.gov.hmrc.auth.core.retrieve.v2.{Retrievals => V2Retrievals}
+import uk.gov.hmrc.auth.core.retrieve.Retrievals
import uk.gov.hmrc.auth.core.{AffinityGroup, CredentialRole}
import uk.gov.hmrc.domain.Nino
import controllers.{Version, Version_1_0}
import domain.{DesUserInfo, _}
-import com.github.ghik.silencer.silent
-@silent trait AuthStub {
+import scala.annotation.nowarn
+
+@nowarn("cat=deprecation")
+trait AuthStub {
implicit class JsOptAppendable(jsObject: JsObject) {
def appendOptional(key: String, value: Option[JsValue]): JsObject = value
@@ -112,10 +114,9 @@ import com.github.ghik.silencer.silent
groupProfileUrl: Option[String] = None,
version: Version = Version_1_0
): Unit = {
- implicit val agentWrites = Json.writes[AgentInformation]
- implicit val credentialWrites = Json.writes[Credentials]
- implicit val nameWrites = Json.writes[Name]
- implicit val emailWrites = Json.writes[Email]
+ implicit val agentWrites: OWrites[AgentInformation] = Json.writes[AgentInformation]
+ implicit val credentialWrites: OWrites[Credentials] = Json.writes[Credentials]
+ implicit val nameWrites: OWrites[Name] = Json.writes[Name]
val jsonAddress: Option[JsValue] = desUserInfo.map(d => Json.toJson(d.address))
val jsonItmpName: Option[JsValue] = desUserInfo.map(d => Json.toJson(d.name))
val jsonAgent: Option[JsValue] = agentInformation.map(Json.toJson(_))
diff --git a/it/stubs/ThirdPartyDelegatedAuthorityStub.scala b/it/test/stubs/ThirdPartyDelegatedAuthorityStub.scala
similarity index 96%
rename from it/stubs/ThirdPartyDelegatedAuthorityStub.scala
rename to it/test/stubs/ThirdPartyDelegatedAuthorityStub.scala
index 22ea01f..66dfc2a 100644
--- a/it/stubs/ThirdPartyDelegatedAuthorityStub.scala
+++ b/it/test/stubs/ThirdPartyDelegatedAuthorityStub.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala
index 700b25d..566a50d 100644
--- a/project/AppDependencies.scala
+++ b/project/AppDependencies.scala
@@ -4,30 +4,30 @@ import sbt.*
object AppDependencies {
- private val bootstrapPlayVersion = "7.15.0"
+ private val bootstrapPlayVersion = "8.4.0"
- val compile: Seq[ModuleID] = Seq(
+ private val compile: Seq[ModuleID] = Seq(
ws,
"uk.gov.hmrc" %% "bootstrap-backend-play-28" % bootstrapPlayVersion,
"uk.gov.hmrc" %% "domain" % "8.3.0-play-28",
"uk.gov.hmrc" %% "play-hmrc-api" % "7.2.0-play-28"
)
- val test: Seq[ModuleID] = Seq(
- "org.scalatest" %% "scalatest" % "3.2.15",
- "org.scalatestplus" %% "scalacheck-1-15" % "3.2.11.0",
- "org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0",
- "com.typesafe.play" %% "play-test" % PlayVersion.current,
- "com.github.tomakehurst" % "wiremock" % "2.27.2",
- "uk.gov.hmrc" %% "bootstrap-test-play-28" % bootstrapPlayVersion,
- "org.pegdown" % "pegdown" % "1.6.0",
- "org.jsoup" % "jsoup" % "1.15.4",
- "org.scalaj" %% "scalaj-http" % "2.4.2",
- "org.mockito" %% "mockito-scala-scalatest" % "1.17.12",
- "org.scalacheck" %% "scalacheck" % "1.17.0",
- "com.github.fge" % "json-schema-validator" % "2.2.6",
- "com.vladsch.flexmark" % "flexmark-all" % "0.64.0"
- ).map(_ % "test, it")
+ private val test: Seq[ModuleID] = Seq(
+ "org.scalatest" %% "scalatest" % "3.2.17",
+ "org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0",
+ "org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0",
+ "com.typesafe.play" %% "play-test" % PlayVersion.current,
+ "com.github.tomakehurst" % "wiremock" % "2.27.2",
+ "uk.gov.hmrc" %% "bootstrap-test-play-28" % bootstrapPlayVersion,
+ "org.pegdown" % "pegdown" % "1.6.0",
+ "org.jsoup" % "jsoup" % "1.17.2",
+ "org.scalaj" %% "scalaj-http" % "2.4.2",
+ "org.mockito" %% "mockito-scala-scalatest" % "1.17.30",
+ "org.scalacheck" %% "scalacheck" % "1.17.0",
+ "com.github.java-json-tools" % "json-schema-validator" % "2.2.14",
+ "com.vladsch.flexmark" % "flexmark-all" % "0.64.0"
+ ).map(_ % Test)
def apply(): Seq[ModuleID] = compile ++ test
diff --git a/project/SilencerSettings.scala b/project/SilencerSettings.scala
deleted file mode 100644
index 09d6374..0000000
--- a/project/SilencerSettings.scala
+++ /dev/null
@@ -1,17 +0,0 @@
-import sbt.Keys.{baseDirectory, libraryDependencies, scalacOptions}
-import sbt.*
-
-object SilencerSettings {
- private val silencerVersion = "1.7.12"
- // stop "unused import" warnings from routes files
- def apply() = Seq(
- libraryDependencies ++= Seq(
- compilerPlugin("com.github.ghik" % "silencer-plugin" % silencerVersion cross CrossVersion.full),
- "com.github.ghik" % "silencer-lib" % silencerVersion % Provided cross CrossVersion.full
- ),
- // silence all warnings on autogenerated files
- scalacOptions += "-P:silencer:pathFilters=target/.*",
- // Make sure you only exclude warnings for the project directories, i.e. make builds reproducible
- scalacOptions += s"-P:silencer:sourceRoots=${baseDirectory.value.getCanonicalPath}"
- )
-}
diff --git a/project/build.properties b/project/build.properties
index c12f2b9..d415199 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=1.7.2
\ No newline at end of file
+sbt.version=1.9.7
\ No newline at end of file
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 62caf3c..76f62eb 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,8 +1,9 @@
resolvers += "HMRC-open-artefacts-maven" at "https://open.artefacts.tax.service.gov.uk/maven2"
resolvers += Resolver.url("HMRC-open-artefacts-ivy", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns)
+ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always // it should not be needed but the build still fails without it
-addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.2.0")
-addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.9.0")
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.19")
+addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.4.0")
+addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.19.0")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.21")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
-addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
+addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
diff --git a/test/config/APIAccessConfigSpec.scala b/test/config/APIAccessConfigSpec.scala
index 6d63e61..16a811f 100644
--- a/test/config/APIAccessConfigSpec.scala
+++ b/test/config/APIAccessConfigSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/connectors/ThirdPartyDelegatedAuthorityConnectorSpec.scala b/test/connectors/ThirdPartyDelegatedAuthorityConnectorSpec.scala
index 079ddc9..d00af4b 100644
--- a/test/connectors/ThirdPartyDelegatedAuthorityConnectorSpec.scala
+++ b/test/connectors/ThirdPartyDelegatedAuthorityConnectorSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/controllers/ErrorResponseSpec.scala b/test/controllers/ErrorResponseSpec.scala
index 870b7b0..e20ea73 100644
--- a/test/controllers/ErrorResponseSpec.scala
+++ b/test/controllers/ErrorResponseSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/controllers/UserInfoControllerSpec.scala b/test/controllers/UserInfoControllerSpec.scala
index f94d6d2..ad3b139 100644
--- a/test/controllers/UserInfoControllerSpec.scala
+++ b/test/controllers/UserInfoControllerSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/controllers/testOnly/FeatureSwitchControllerSpec.scala b/test/controllers/testOnly/FeatureSwitchControllerSpec.scala
index 7829b9b..b0f5446 100644
--- a/test/controllers/testOnly/FeatureSwitchControllerSpec.scala
+++ b/test/controllers/testOnly/FeatureSwitchControllerSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/data/UserInfoGeneratorSpec.scala b/test/data/UserInfoGeneratorSpec.scala
index 5139a06..26e95bb 100644
--- a/test/data/UserInfoGeneratorSpec.scala
+++ b/test/data/UserInfoGeneratorSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/services/UserInfoServiceSpec.scala b/test/services/UserInfoServiceSpec.scala
index f2343d4..b52abd4 100644
--- a/test/services/UserInfoServiceSpec.scala
+++ b/test/services/UserInfoServiceSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,7 +77,7 @@ class UserInfoServiceSpec extends UnitSpec with MockitoSugar with ScalaFutures {
)
trait Setup {
- implicit val headers = HeaderCarrier().copy(authorization = Some(Authorization(authorizationTokens)), otherHeaders = otherHeaders)
+ implicit val headers: HeaderCarrier = HeaderCarrier().copy(authorization = Some(Authorization(authorizationTokens)), otherHeaders = otherHeaders)
val mockAuthConnector: AuthConnector = mock[AuthConnectorV1]
val mockUserInfoGenerator: UserInfoGenerator = mock[UserInfoGenerator]
diff --git a/test/services/UserInfoTransformerSpec.scala b/test/services/UserInfoTransformerSpec.scala
index b911b21..534e7e1 100644
--- a/test/services/UserInfoTransformerSpec.scala
+++ b/test/services/UserInfoTransformerSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/test/testSupport/UnitSpec.scala b/test/testSupport/UnitSpec.scala
index 26c3d54..6d1768c 100644
--- a/test/testSupport/UnitSpec.scala
+++ b/test/testSupport/UnitSpec.scala
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 HM Revenue & Customs
+ * Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.