diff options
author | crupest <crupest@outlook.com> | 2021-01-07 16:36:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 16:36:57 +0800 |
commit | 5ad1b1f0191ee1131e7808c8fcb0484ba29c0d4d (patch) | |
tree | c483a2fff48ad952e787e5af1bb541d939a09f19 /BackEnd/Timeline/Auth/MyAuthenticationHandler.cs | |
parent | 20e9136a9f27a0b77f076ea5997b71d89ce3cfca (diff) | |
parent | df1ef1e21d8d889a2c9abd440039533c6a43818f (diff) | |
download | timeline-5ad1b1f0191ee1131e7808c8fcb0484ba29c0d4d.tar.gz timeline-5ad1b1f0191ee1131e7808c8fcb0484ba29c0d4d.tar.bz2 timeline-5ad1b1f0191ee1131e7808c8fcb0484ba29c0d4d.zip |
Merge pull request #198 from crupest/back-dev
Refactor back end.
Diffstat (limited to 'BackEnd/Timeline/Auth/MyAuthenticationHandler.cs')
-rw-r--r-- | BackEnd/Timeline/Auth/MyAuthenticationHandler.cs | 2 |
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);
|