public async Task <bool> TwoFactorBrowserRememberedAsync(string userId, int?tenantId) { var result = await AuthenticationManager.AuthenticateAsync(_configuration.TwoFactorRememberBrowserAuthenticationScheme); if (result?.Identity == null) { return(false); } if (IdentityExtensions.GetUserId(result.Identity) != userId) { return(false); } if (AbpZeroClaimsIdentityHelper.GetTenantId(result.Identity) != tenantId) { return(false); } return(true); }
public virtual async Task <int?> GetVerifiedTenantIdAsync() { var authenticateResult = await AuthenticationManager.AuthenticateAsync(_configuration.TwoFactorAuthenticationScheme); return(AbpZeroClaimsIdentityHelper.GetTenantId(authenticateResult?.Identity)); }