Skip to content

Commit

Permalink
Merge pull request #4 from hmrc/hip-199_login_link_landing_page
Browse files Browse the repository at this point in the history
HIPP-199: remove identity action to skip auth
  • Loading branch information
PaulCDurham authored Dec 15, 2022
2 parents bf72106 + c3a7b0d commit bd6b947
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions app/config/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class Module extends AbstractModule {
bind(classOf[DataRetrievalAction]).to(classOf[DataRetrievalActionImpl]).asEagerSingleton()
bind(classOf[DataRequiredAction]).to(classOf[DataRequiredActionImpl]).asEagerSingleton()

// For session based storage instead of cred based, change to SessionIdentifierAction
bind(classOf[IdentifierAction]).to(classOf[AuthenticatedIdentifierAction]).asEagerSingleton()

bind(classOf[Clock]).toInstance(Clock.systemDefaultZone.withZone(ZoneOffset.UTC))
}
}
7 changes: 3 additions & 4 deletions app/controllers/IndexController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@

package controllers

import controllers.actions.IdentifierAction
import javax.inject.Inject
import play.api.i18n.I18nSupport
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents}
import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController
import views.html.IndexView

import javax.inject.Inject

class IndexController @Inject()(
val controllerComponents: MessagesControllerComponents,
identify: IdentifierAction,
view: IndexView
) extends FrontendBaseController with I18nSupport {

def onPageLoad: Action[AnyContent] = identify { implicit request =>
def onPageLoad: Action[AnyContent] = Action { implicit request =>
Ok(view())
}
}

0 comments on commit bd6b947

Please sign in to comment.