public string IdToken(HttpContext context) { var identity = idProvider.GetIdentity(context); var entitlement = entitlementService.GetEntitlement(context, identity); var claims = IdClaims(identity, entitlement); return(CreateToken(claims, expireMinutes: authenticationOptions.SessionTimeoutMinutes)); }
public async Task <string> IdToken(HttpContext context) { var identity = idProvider.GetIdentity(context); var entitlement = entitlementService.GetEntitlement(context, identity); var claims = IdClaims(identity, entitlement); await saver.SaveLogin(new LoginEvent(identity, jwtOptions.Issuer, claims)); return(CreateToken(claims, expireMinutes: authenticationOptions.SessionTimeoutMinutes)); }