Skip to content

Commit 64452e0

Browse files
committed
.net core 3.1 + angular 8
1 parent 7fee6d5 commit 64452e0

File tree

9 files changed

+4616
-3288
lines changed

9 files changed

+4616
-3288
lines changed

src/AuthServer/AuthServer.Infrastructure/AuthServer.Infrastructure.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

src/AuthServer/AuthServer/AuthServer.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
66
</PropertyGroup>
77

src/AuthServer/AuthServer/Controllers/AccountController.cs

+11-1
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,21 @@ namespace AuthServer.Controllers
1818
{
1919
public class AccountController : Controller
2020
{
21+
private readonly SignInManager<AppUser> _signInManager;
2122
private readonly UserManager<AppUser> _userManager;
2223
private readonly IIdentityServerInteractionService _interaction;
2324
private readonly IAuthenticationSchemeProvider _schemeProvider;
2425
private readonly IClientStore _clientStore;
2526
private readonly IEventService _events;
2627

27-
public AccountController(UserManager<AppUser> userManager, IIdentityServerInteractionService interaction, IAuthenticationSchemeProvider schemeProvider, IClientStore clientStore, IEventService events)
28+
public AccountController(SignInManager<AppUser> signInManager, UserManager<AppUser> userManager, IIdentityServerInteractionService interaction, IAuthenticationSchemeProvider schemeProvider, IClientStore clientStore, IEventService events)
2829
{
2930
_userManager = userManager;
3031
_interaction = interaction;
3132
_schemeProvider = schemeProvider;
3233
_clientStore = clientStore;
3334
_events = events;
35+
_signInManager = signInManager;
3436
}
3537

3638
/// <summary>
@@ -175,6 +177,14 @@ public async Task<IActionResult> Register([FromBody]RegisterRequestViewModel mod
175177
return Ok(new RegisterResponseViewModel(user));
176178
}
177179

180+
[HttpGet]
181+
public async Task<IActionResult> Logout(string logoutId)
182+
{
183+
await _signInManager.SignOutAsync();
184+
var context = await _interaction.GetLogoutContextAsync(logoutId);
185+
return Redirect(context.PostLogoutRedirectUri);
186+
}
187+
178188
/*****************************************/
179189
/* helper APIs for the AccountController */
180190
/*****************************************/

src/Resource.Api/Resource.Api/Resource.Api.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)