public account(bool isLogin) { this.isLogin = isLogin; this.username = null; this.avater = null; this.userid = -1; this.claim = claims.guest; }
public static ClaimsPrincipal From(params Claim[] claims) => new(new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme));
TokenHandler.CreateToken( GetTokenDescriptor(subject, claims, issuer, audience, expiry, notBefore, issuedAt) ));
context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));