Show / Hide Table of Contents

Class ExtendedSignInManagerExtensions

Extension methods for ExtendedSignInManager<TUser>.

Inheritance
Object
ExtendedSignInManagerExtensions
Inherited Members
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public static class ExtendedSignInManagerExtensions

Methods

GetTenantIdAsync<TUser>(SignInManager<TUser>, String, Boolean)

Tries to get a tenant id from a username.

Declaration
public static async Task<Guid?> GetTenantIdAsync<TUser>(this SignInManager<TUser> signInManager, string username, bool matchOnDomain = true)
    where TUser : class
Parameters
SignInManager<TUser> signInManager

String username

The username to resolve a tenant id for.

Boolean matchOnDomain

True to match on domain name from username; otherwise false.

Returns
System.Threading.Tasks.Task<System.Nullable<System.Guid>>

Type Parameters
TUser

Remarks

It will first try to resolve a temporary tenant and then try to match the domain from the username against trusted domains if matchOnDomain is true.

GetTenantResolver<TUser>(SignInManager<TUser>, Boolean)

Gets the IResolveTenant if that is possible for the supplied signInManager.

Declaration
public static IResolveTenant GetTenantResolver<TUser>(this SignInManager<TUser> signInManager, bool throwException = false)
    where TUser : class
Parameters
SignInManager<TUser> signInManager

Boolean throwException

true to throw an System.InvalidOperationException is signInManager is not able to resolve tenants.

Returns
IResolveTenant

Type Parameters
TUser

Exceptions
System.InvalidOperationException

Back to top Generated by DocFX