Browse Source

tweaks to tokens

pull/95/head
Kyle Spearrin 9 years ago
parent
commit
d42a47e5f0
  1. 2
      src/Core/IdentityServer/ApiResources.cs
  2. 4
      src/Core/IdentityServer/ProfileService.cs

2
src/Core/IdentityServer/ApiResources.cs

@ -16,7 +16,7 @@ namespace Bit.Core.IdentityServer @@ -16,7 +16,7 @@ namespace Bit.Core.IdentityServer
JwtClaimTypes.Email,
JwtClaimTypes.EmailVerified,
"sstamp", // security stamp
"plan",
"premium",
"device",
"orgowner",
"orgadmin",

4
src/Core/IdentityServer/ProfileService.cs

@ -42,9 +42,9 @@ namespace Bit.Core.IdentityServer @@ -42,9 +42,9 @@ namespace Bit.Core.IdentityServer
{
newClaims.AddRange(new List<Claim>
{
new Claim("plan", "0"), // free plan hard coded for now
new Claim("premium", user.Premium ? "true" : "false", ClaimValueTypes.Boolean),
new Claim(JwtClaimTypes.Email, user.Email),
new Claim(JwtClaimTypes.EmailVerified, user.EmailVerified ? "true" : "false"),
new Claim(JwtClaimTypes.EmailVerified, user.EmailVerified ? "true" : "false", ClaimValueTypes.Boolean),
new Claim(_identityOptions.ClaimsIdentity.SecurityStampClaimType, user.SecurityStamp)
});

Loading…
Cancel
Save