Skip to content

Commit f3eaed1

Browse files
committed
Merge pull request #8 from hmrc/API-1445
API-1445 - Signed out page for api revocation
2 parents 776f2e6 + 1178402 commit f3eaed1

File tree

6 files changed

+41
-5
lines changed

6 files changed

+41
-5
lines changed

app/config/frontendAppConfig.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ object FrontendAppConfig extends AppConfig with ServicesConfig {
4545
override lazy val reportAProblemPartialUrl = s"$contactHost/contact/problem_reports_ajax?service=$contactFormServiceIdentifier"
4646
override lazy val reportAProblemNonJSUrl = s"$contactHost/contact/problem_reports_nonjs?service=$contactFormServiceIdentifier"
4747
override lazy val signInUrl = s"$caFrontendHost/gg/sign-in?continue=$loginCallbackBaseUrl/applications-permissions-withdrawal/applications"
48-
override lazy val signOutUrl = s"$caFrontendHost/gg/sign-out"
48+
override lazy val signOutUrl = s"$caFrontendHost/gg/sign-out?continue=$loginCallbackBaseUrl/applications-permissions-withdrawal/loggedout"
4949
}

app/controllers/Revocation.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ trait Revocation extends FrontendController with Authentication {
3636
Future.successful(Ok(views.html.revocation.start()))
3737
}
3838

39+
val loggedOut = Action.async { implicit request =>
40+
Future.successful(Ok(views.html.revocation.loggedOut()))
41+
}
42+
3943
val listAuthorizedApplications = authenticated.async { implicit user => implicit request =>
4044
delegatedAuthorityConnector.fetchApplicationAuthorities()
4145
.map(applications => Ok(views.html.revocation.authorizedApplications(applications)))
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@()(implicit request: Request[_])
2+
3+
@body = {
4+
5+
<div class="content__body">
6+
7+
<header>
8+
<h1>You’re signed out</h1>
9+
</header>
10+
<ul class="action-list">
11+
<ul>
12+
<li>
13+
<a href="@controllers.routes.Revocation.listAuthorizedApplications" target="_self" data-sso="false">Sign in to your account</a>
14+
</li>
15+
<li>
16+
<a href="https://www.gov.uk" target="_blank" data-sso="false" rel="external">Explore GOV.UK<span class="visuallyhidden">link opens in a new window</span></a>
17+
</li>
18+
</ul>
19+
</ul>
20+
</div>
21+
}
22+
23+
@main_template(title = "Signed Out", headerNavLinks = None) {
24+
@body
25+
}

conf/app.routes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ GET / controllers.Revocation.st
44
GET /applications controllers.Revocation.listAuthorizedApplications
55
GET /application/:id/withdraw-permission controllers.Revocation.withdrawPage(id: java.util.UUID)
66
POST /application/:id/withdraw-permission controllers.Revocation.withdrawAction(id: java.util.UUID)
7-
GET /application/:id/permission-withdrawn controllers.Revocation.withdrawConfirmationPage(id: java.util.UUID)
7+
GET /application/:id/permission-withdrawn controllers.Revocation.withdrawConfirmationPage(id: java.util.UUID)
8+
GET /loggedout controllers.Revocation.loggedOut

conf/application.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ microservice {
3131
}
3232
}
3333

34-
#dev only
35-
contact-frontend.host = "http://localhost:9250"
36-
3734
services {
3835
auth {
3936
host = localhost

test/unit/controllers/RevocationSpec.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ class RevocationSpec extends UnitSpec with WithFakeApplication with MockitoSugar
6161
}
6262
}
6363

64+
"Logged Out" should {
65+
"return 200" in {
66+
67+
val result = underTest.loggedOut(loggedOutRequest)
68+
69+
status(result) shouldBe Status.OK
70+
}
71+
}
72+
6473
"listAuthorizedApplications" should {
6574
"return 200 when the user is logged in" in {
6675

0 commit comments

Comments
 (0)