public async Task <IList <Claim> > GetClaimsAsync(TUser user, CancellationToken cancellationToken) { ThrowIfDisposed(); cancellationToken.ThrowIfCancellationRequested(); log.LogDebug("GetClaimsAsync"); if (user == null) { throw new ArgumentNullException("user"); } var claims = new List <Claim>(); var siteGuid = siteSettings.Id; if (multiTenantOptions.UseRelatedSitesMode) { siteGuid = multiTenantOptions.RelatedSiteId; } var userClaims = await queries.GetClaimsByUser(siteGuid, user.Id, cancellationToken); foreach (UserClaim uc in userClaims) { Claim c = new Claim(uc.ClaimType, uc.ClaimValue); claims.Add(c); } return(claims); }