diff options
author | 杨宇千 <crupest@outlook.com> | 2019-07-23 19:03:25 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-07-23 19:03:25 +0800 |
commit | cccaf4cfdc1b932882768975f409763c22ed1ee1 (patch) | |
tree | 572a2ae5c65c484718b3bfda68fd8babc56fe6f2 /Timeline/Authenticate/AuthHandler.cs | |
parent | e34873c8cec905cd38c754d8968e848c9d0db5c2 (diff) | |
download | timeline-cccaf4cfdc1b932882768975f409763c22ed1ee1.tar.gz timeline-cccaf4cfdc1b932882768975f409763c22ed1ee1.tar.bz2 timeline-cccaf4cfdc1b932882768975f409763c22ed1ee1.zip |
Fix bugs and write unit tests.
Diffstat (limited to 'Timeline/Authenticate/AuthHandler.cs')
-rw-r--r-- | Timeline/Authenticate/AuthHandler.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Timeline/Authenticate/AuthHandler.cs b/Timeline/Authenticate/AuthHandler.cs index 80bbaf14..80860edf 100644 --- a/Timeline/Authenticate/AuthHandler.cs +++ b/Timeline/Authenticate/AuthHandler.cs @@ -78,7 +78,7 @@ namespace Timeline.Authenticate { var userInfo = await _userService.VerifyToken(token); - var identity = new ClaimsIdentity(); + var identity = new ClaimsIdentity(AuthConstants.Scheme); identity.AddClaim(new Claim(identity.NameClaimType, userInfo.Username, ClaimValueTypes.String)); identity.AddClaims(Entities.UserUtility.IsAdminToRoleArray(userInfo.IsAdmin).Select(role => new Claim(identity.RoleClaimType, role, ClaimValueTypes.String))); |