Finishddd
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace TechHelper.Client.AuthProviders
|
||||
{
|
||||
public class TestAuthStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
|
||||
|
||||
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
|
||||
{
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
new Claim(ClaimTypes.Name, "John Doe"),
|
||||
new Claim(ClaimTypes.Role, "Administrator")
|
||||
};
|
||||
|
||||
var anonymous = new ClaimsIdentity();
|
||||
|
||||
return await Task.FromResult(new AuthenticationState(new ClaimsPrincipal(anonymous)));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user