This commit is contained in:
2022-06-22 18:29:19 -05:00
parent 770344422d
commit 02e64daec5
9 changed files with 101 additions and 105 deletions

View File

@@ -1,8 +1,6 @@
using Gameboard.ShogiUI.Sockets.Repositories.CouchModels;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Security.Claims;
@@ -62,7 +60,6 @@ namespace Gameboard.ShogiUI.Sockets.Models
new Claim(ClaimTypes.NameIdentifier, Id),
new Claim(ClaimTypes.Name, DisplayName),
new Claim(ClaimTypes.Role, "Guest"),
new Claim(ClaimTypes.Role, "Shogi") // The Shogi role grants access to api controllers.
};
return new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
}
@@ -72,7 +69,6 @@ namespace Gameboard.ShogiUI.Sockets.Models
{
new Claim(ClaimTypes.NameIdentifier, Id),
new Claim(ClaimTypes.Name, DisplayName),
new Claim(ClaimTypes.Role, "Shogi") // The Shogi role grants access to api controllers.
};
return new ClaimsIdentity(claims, JwtBearerDefaults.AuthenticationScheme);
}