-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Enable authentication to the service using active directory /…
… entra / microsoft account" This reverts commit 80f0a72.
- Loading branch information
1 parent
80f0a72
commit 3041520
Showing
9 changed files
with
54 additions
and
267 deletions.
There are no files selected for viewing
54 changes: 0 additions & 54 deletions
54
src/ServiceAssessmentService/ServiceAssessmentService.WebApp/Models/GraphUserClient.cs
This file was deleted.
Oops, something went wrong.
94 changes: 0 additions & 94 deletions
94
src/ServiceAssessmentService/ServiceAssessmentService.WebApp/Pages/Me/Index.cshtml
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/ServiceAssessmentService/ServiceAssessmentService.WebApp/Pages/Me/Index.cshtml.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 15 additions & 5 deletions
20
...erviceAssessmentService/ServiceAssessmentService.WebApp/Pages/Shared/_LoginPartial.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
@using GovUk.Frontend.AspNetCore.TagHelpers | ||
@using Microsoft.AspNetCore.Identity | ||
@using ServiceAssessmentService.Data.Entities | ||
@using GovUk.Frontend.AspNetCore.TagHelpers | ||
|
||
@inject SignInManager<ServiceAssessmentServiceWebAppUser> SignInManager | ||
@inject UserManager<ServiceAssessmentServiceWebAppUser> UserManager | ||
|
||
<ul class="dfe-header__action-links"> | ||
@if (User?.Identity?.IsAuthenticated ?? false) | ||
@if (SignInManager.IsSignedIn(User)) | ||
{ | ||
<li class="nav-item"> | ||
<span class="govuk-link govuk-link--inverse">Hello @User.Identity.Name!</span> | ||
<a class="govuk-link govuk-link--inverse" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @UserManager.GetUserName(User)!</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="govuk-link govuk-link--inverse" asp-area="MicrosoftIdentity" asp-controller="Account" asp-action="SignOut">Sign out</a> | ||
<form id="logoutForm" class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/"> | ||
<button id="logout" type="submit" class="nav-link btn btn-link text-dark border-0">Logout</button> | ||
</form> | ||
</li> | ||
} | ||
else | ||
{ | ||
<li class="nav-item"> | ||
<a class="govuk-link govuk-link--inverse" asp-area="MicrosoftIdentity" asp-controller="Account" asp-action="SignIn">Sign in</a> | ||
<a class="govuk-link govuk-link--inverse" asp-area="Identity" asp-page="/Account/Register">Register</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="govuk-link govuk-link--inverse" asp-area="Identity" asp-page="/Account/Login">Login</a> | ||
</li> | ||
} | ||
</ul> |
Oops, something went wrong.