Skip to content

Commit

Permalink
Merge pull request #76 from hmrc/GG-5208-openid-connect-userinfo
Browse files Browse the repository at this point in the history
restructured package names
  • Loading branch information
ShaneTN authored Dec 21, 2020
2 parents 083d0e3 + b7bf178 commit 208c776
Show file tree
Hide file tree
Showing 51 changed files with 111 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.config
package config

import com.typesafe.config.{Config, ConfigObject}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.config
package config

import javax.inject.{Inject, Singleton}
import com.typesafe.config.ConfigObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.config
package config

case class FeatureSwitch(name: String, isEnabled: Boolean)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.config
package config

import com.google.inject.AbstractModule
import com.google.inject.name.Names
import com.typesafe.config.Config
import play.api.{Configuration, Environment}
import uk.gov.hmrc.http.{CorePost, HttpGet}
import uk.gov.hmrc.openidconnect.userinfo.connectors._
import uk.gov.hmrc.openidconnect.userinfo.services.{LiveUserInfoService, SandboxUserInfoService, UserInfoService}
import connectors._
import services.{LiveUserInfoService, SandboxUserInfoService, UserInfoService}
import uk.gov.hmrc.play.bootstrap.http.{DefaultHttpClient, HttpClient}
import uk.gov.hmrc.play.bootstrap.config.ControllerConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.connectors
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.{AuthorisedFunctions, Enrolments, PlayAuthConnector}
import uk.gov.hmrc.http.{CorePost, HeaderCarrier, NotFoundException}
import uk.gov.hmrc.openidconnect.userinfo.domain.{Authority, DesUserInfo, UserDetails}
import uk.gov.hmrc.openidconnect.userinfo.config.AppContext
import domain.{Authority, DesUserInfo, UserDetails}
import config.AppContext

import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.connectors
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.http.{HeaderCarrier, NotFoundException}
import uk.gov.hmrc.openidconnect.userinfo.domain.UserDetails
import domain.UserDetails

import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.connectors
package connectors

import uk.gov.hmrc.auth.core.AuthorisedFunctions
import uk.gov.hmrc.auth.core.retrieve.v2.Retrievals
import uk.gov.hmrc.auth.core.retrieve.~
import uk.gov.hmrc.http.{HeaderCarrier, NotFoundException}
import uk.gov.hmrc.openidconnect.userinfo.domain.UserDetails
import domain.UserDetails

import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.connectors
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 uk.gov.hmrc.openidconnect.userinfo.config.AppContext
import config.AppContext
import uk.gov.hmrc.http.HttpReads.Implicits.readRaw

import scala.util.control.NonFatal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.connectors
package connectors

import uk.gov.hmrc.http.HeaderCarrier
import uk.gov.hmrc.openidconnect.userinfo.domain.UserDetails
import domain.UserDetails

import scala.concurrent.{ExecutionContext, Future}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.controllers
package controllers

import javax.inject.{Inject, Singleton}
import controllers.Assets
import play.api.http.HttpErrorHandler
import play.api.mvc.{Action, AnyContent, ControllerComponents}
import uk.gov.hmrc.openidconnect.userinfo.config.{APIAccessVersions, AppContext}
import uk.gov.hmrc.openidconnect.userinfo.views._
import config.{APIAccessVersions, AppContext}
import views._

import scala.language.dynamics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.controllers
package controllers

import play.mvc.Http.Status._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.controllers
package controllers

import javax.inject.{Inject, Singleton}
import com.google.inject.name.Named
Expand All @@ -23,8 +23,8 @@ import play.api.libs.json.Json
import play.api.mvc.{AnyContent, BodyParser, ControllerComponents}
import uk.gov.hmrc.api.controllers.HeaderValidator
import uk.gov.hmrc.http.{BadRequestException, Upstream4xxResponse, Upstream5xxResponse}
import uk.gov.hmrc.openidconnect.userinfo.config.AppContext
import uk.gov.hmrc.openidconnect.userinfo.services.{LiveUserInfoService, SandboxUserInfoService, UserInfoService}
import config.AppContext
import services.{LiveUserInfoService, SandboxUserInfoService, UserInfoService}
import uk.gov.hmrc.play.bootstrap.controller.BackendBaseController

import scala.concurrent.ExecutionContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo

import play.api.libs.json.{JsValue, Json, Writes}

package object controllers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.controllers.testOnly
package controllers.testOnly

import javax.inject.{Inject, Singleton}
import play.api.libs.json.Json
import play.api.mvc.{Action, ControllerComponents}
import uk.gov.hmrc.openidconnect.userinfo.config.{FeatureSwitch, UserInfoFeatureSwitches}
import config.{FeatureSwitch, UserInfoFeatureSwitches}
import uk.gov.hmrc.play.bootstrap.controller.BackendController

import scala.concurrent.ExecutionContext.Implicits.global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.data
package data

import javax.inject.Singleton
import org.joda.time._
import org.scalacheck.Gen
import uk.gov.hmrc.auth.core.{Enrolment, EnrolmentIdentifier}
import uk.gov.hmrc.openidconnect.userinfo.config.UserInfoFeatureSwitches
import uk.gov.hmrc.openidconnect.userinfo.domain.{Address, GovernmentGatewayDetails, Mdtp, UserInfo}
import config.UserInfoFeatureSwitches
import domain.{Address, GovernmentGatewayDetails, Mdtp, UserInfo}

@Singleton
class UserInfoGenerator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

case class APIAccess(`type`: String, allowlistedApplicationIds: Option[Seq[String]])
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

case class Authority(credId: String,
nino: Option[String] = None)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

import uk.gov.hmrc.auth.core.Enrolment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

case class GovernmentGatewayDetails(
user_id: Option[String],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

case class NinoNotFoundException() extends Exception
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

import org.joda.time.LocalDate
import uk.gov.hmrc.auth.core.retrieve.{GatewayInformation, MdtpInformation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.domain
package domain

import org.joda.time.LocalDate
import uk.gov.hmrc.auth.core.Enrolment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo

import org.joda.time._
import play.api.libs.json._
import uk.gov.hmrc.auth.core.retrieve.{GatewayInformation, ItmpAddress, ItmpName, MdtpInformation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.filters
package filters

import akka.stream.Materializer
import javax.inject.{Inject, Singleton}
Expand All @@ -23,8 +23,8 @@ import play.api.libs.json.Json
import play.api.mvc.{Filter, RequestHeader, Result, Results}
import play.api.routing.Router
import uk.gov.hmrc.auth.core.{AuthorisationException, AuthorisedFunctions}
import uk.gov.hmrc.openidconnect.userinfo.connectors.AuthConnector
import uk.gov.hmrc.openidconnect.userinfo.controllers.ErrorUnauthorized
import connectors.AuthConnector
import controllers.ErrorUnauthorized
import uk.gov.hmrc.play.HeaderCarrierConverter

import scala.concurrent.{ExecutionContext, Future}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.filters
package filters

import javax.inject.{Inject, Singleton}
import com.kenshoo.play.metrics.MetricsFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.handlers
package handlers

import javax.inject.{Inject, Singleton}
import com.google.inject.Provider
Expand All @@ -24,7 +24,7 @@ import play.api.mvc.Results.Status
import play.api.mvc.{RequestHeader, Result}
import play.api.routing.Router
import play.api.{Configuration, Environment, OptionalSourceMapper}
import uk.gov.hmrc.openidconnect.userinfo.controllers.{ErrorBadGateway, ErrorUnauthorized}
import controllers.{ErrorBadGateway, ErrorUnauthorized}
import scala.concurrent.{ExecutionContext, Future}

@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.services
package services

import javax.inject.{Inject, Named, Singleton}

import org.scalacheck.Gen
import uk.gov.hmrc.auth.core.Enrolments
import uk.gov.hmrc.http.logging.Authorization
import uk.gov.hmrc.http.{BadRequestException, HeaderCarrier, UnauthorizedException}
import uk.gov.hmrc.openidconnect.userinfo.connectors._
import uk.gov.hmrc.openidconnect.userinfo.controllers.{Version, Version_1_0, Version_1_1}
import uk.gov.hmrc.openidconnect.userinfo.data.UserInfoGenerator
import uk.gov.hmrc.openidconnect.userinfo.domain._
import connectors._
import controllers.{Version, Version_1_0, Version_1_1}
import data.UserInfoGenerator
import domain._

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package uk.gov.hmrc.openidconnect.userinfo.services
package services

import javax.inject.Singleton
import org.joda.time.LocalDate
import uk.gov.hmrc.auth.core.Enrolments
import uk.gov.hmrc.auth.core.retrieve.ItmpAddress
import uk.gov.hmrc.openidconnect.userinfo.config.UserInfoFeatureSwitches
import uk.gov.hmrc.openidconnect.userinfo.domain._
import config.UserInfoFeatureSwitches
import domain._

@Singleton
class UserInfoTransformer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import uk.gov.hmrc.openidconnect.userinfo.config.APIAccessConfig
@import config.APIAccessConfig
@import play.api.libs.json.Json

@(versions: List[APIAccessConfig])
Expand Down
Loading

0 comments on commit 208c776

Please sign in to comment.