aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Auth
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-07 16:23:20 +0800
committercrupest <crupest@outlook.com>2021-01-07 16:23:20 +0800
commit7594a16e38304739487b053405153379faee6e58 (patch)
treebb99d1a24fffc9c4142219b9c25dc66e3d2b60d2 /BackEnd/Timeline/Auth
parent97e094c97dc9ed79cf7daa0a93568e1933015bdd (diff)
downloadtimeline-7594a16e38304739487b053405153379faee6e58.tar.gz
timeline-7594a16e38304739487b053405153379faee6e58.tar.bz2
timeline-7594a16e38304739487b053405153379faee6e58.zip
史诗级重构!
Diffstat (limited to 'BackEnd/Timeline/Auth')
-rw-r--r--BackEnd/Timeline/Auth/MyAuthenticationHandler.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
index 223ff187..c57c96bc 100644
--- a/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
+++ b/BackEnd/Timeline/Auth/MyAuthenticationHandler.cs
@@ -84,7 +84,7 @@ namespace Timeline.Auth
var identity = new ClaimsIdentity(AuthenticationConstants.Scheme);
identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, user.Id.ToString(CultureInfo.InvariantCulture), ClaimValueTypes.Integer64));
identity.AddClaim(new Claim(identity.NameClaimType, user.Username, ClaimValueTypes.String));
- identity.AddClaims(user.Permissions.Select(permission => new Claim(AuthenticationConstants.PermissionClaimName, permission.ToString(), ClaimValueTypes.String)));
+ identity.AddClaims(user.Permissions.Select(permission => new Claim(AuthenticationConstants.PermissionClaimName, permission.Permission, ClaimValueTypes.String)));
var principal = new ClaimsPrincipal();
principal.AddIdentity(identity);