| 123456789101112131415161718192021222324252627282930 |
- using Abp.Threading;
- using IwbZero.Authorization.Roles;
- using IwbZero.MultiTenancy;
- namespace IwbZero.Authorization.Users
- {
- public static class IwbLogInManagerExtensions
- {
- public static IwbLoginResult<TTenant, TUser> Login<TTenant, TRole, TUser>(
- this IwbLogInManager<TTenant, TRole, TUser> logInManager,
- string userNameOrEmailAddress,
- string plainPassword,
- string tenancyName = null,
- bool shouldLockout = true)
- where TTenant : IwbTenant<TUser>
- where TRole : IwbSysRole<TUser>, new()
- where TUser : IwbSysUser<TUser>
- {
- return AsyncHelper.RunSync(
- () => logInManager.LoginAsync(
- userNameOrEmailAddress,
- plainPassword,
- tenancyName,
- shouldLockout
- )
- );
- }
- }
- }
|