Code cleanup

This commit is contained in:
Kun Deng committed 2022-08-27 20:35:34 -04:00
1 parent e5bea187f4
commit 665407aac5
12 files changed
+4 -464

No files matched your search

-21
View File
@@ -1,21 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
namespace Icarus.Models.Shared
{
public class User
{
public string Username { get; set; }
public string Password { get; set; }
public IEnumerable<string> Roles { get; set; }
public IEnumerable<Claim> Claims()
{
var claims = new List<Claim> { new Claim(ClaimTypes.Name, Username) };
claims.AddRange(Roles.Select(role => new Claim(ClaimTypes.Role, role)));
return claims;
}
}
}
-8
View File
@@ -1,8 +0,0 @@
namespace Icarus.Models.Shared
{
public class UserCredentials
{
public string Username { get; set; }
public string Password { get; set; }
}
}