Added oidc service to webapi with a dumb way of authenticating incoming tokens

This commit is contained in:
2021-10-13 22:26:45 -04:00
parent cccd609233
commit 33cbb4f136
13 changed files with 120 additions and 114 deletions

View File

@@ -0,0 +1,21 @@
@page "/CreateServer"
@using Microsoft.AspNetCore.Http
@using Microsoft.AspNetCore.Authentication
@inject IHttpContextAccessor _httpContextAccessor
<AuthorizeView>
<Authorized>
</Authorized>
<NotAuthorized>
<h1>You must be logged in to view this page!</h1>
</NotAuthorized>
</AuthorizeView>
@code {
protected async override Task OnInitializedAsync()
{
string token = await _httpContextAccessor.HttpContext.GetTokenAsync("access_token");
var t = 2;
}
}