diff --git a/Server/Program.cs b/Server/Program.cs index 180bbae..c64a7d7 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -14,7 +14,6 @@ var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers().AddNewtonsoftJson(o => { - o.SerializerSettings.ContractResolver = new DefaultContractResolver(); o.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; }); builder.Services.AddEndpointsApiExplorer(); diff --git a/Server/Services/AuthenticationService.cs b/Server/Services/AuthenticationService.cs index fd8e849..c1c9109 100644 --- a/Server/Services/AuthenticationService.cs +++ b/Server/Services/AuthenticationService.cs @@ -63,7 +63,8 @@ public class AuthenticationService { var subject = new ClaimsIdentity(new[] { new Claim("Id", user.Id.ToString()), - new Claim(ClaimTypes.Role, user.Role), + new Claim("Username", user.Username), + new Claim(ClaimTypes.Role, user.Role) }); return subject;