feat: finished login system
This commit is contained in:
parent
7c0cef6f65
commit
08e54e7036
5 changed files with 21 additions and 16 deletions
|
@ -25,7 +25,8 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
|
|||
return await Task.FromResult(new AuthenticationState(_anonymous));
|
||||
var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>
|
||||
{
|
||||
new Claim(ClaimTypes.Email, userSession.Email),
|
||||
//new Claim(ClaimTypes.Email, userSession.Email),
|
||||
new Claim(ClaimTypes.Name, userSession.Email),
|
||||
new Claim(ClaimTypes.Role, userSession.Role)
|
||||
}, "CustomAuth"));
|
||||
return await Task.FromResult(new AuthenticationState(claimsPrincipal));
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
namespace ImageBoardServerApp.Auth;
|
||||
|
||||
public class UserSession
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public string Role { get; set; }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue