public RegisterModel( IAuthenticationSchemeProvider schemeProvider, IAccountAppService accountAppService) { AccountAppService = accountAppService; ExternalProviderHelper = new ExternalProviderHelper(schemeProvider); }
public RegisterModel( IAuthenticationSchemeProvider schemeProvider, IOptions <AbpAccountOptions> accountOptions, IAccountAppService accountAppService) { AccountAppService = accountAppService; ExternalProviderHelper = new ExternalProviderHelper(schemeProvider, accountOptions.Value); }
public override async Task <IActionResult> OnGetAsync() { Input = new LoginInputModel(); var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl); if (context != null) { Input.UserNameOrEmailAddress = context.LoginHint; //TODO: Reference AspNetCore MultiTenancy module and use options to get the tenant key! var tenant = context.Parameters[TenantResolverConsts.DefaultTenantKey]; if (!string.IsNullOrEmpty(tenant)) { CurrentTenant.Change(Guid.Parse(tenant)); Response.Cookies.Append(TenantResolverConsts.DefaultTenantKey, tenant); } } if (context?.IdP != null) { Input.UserNameOrEmailAddress = context.LoginHint; ExternalProviderHelper.VisibleExternalProviders = new[] { new ExternalProviderModel { AuthenticationScheme = context.IdP } }; return(Page()); } await ExternalProviderHelper.GetVisibleExternalProviders(); EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); if (context?.Client?.ClientId != null) { var client = await ClientStore.FindEnabledClientByIdAsync(context.Client.ClientId); if (client != null) { EnableLocalLogin = client.EnableLocalLogin; if (client.IdentityProviderRestrictions != null && client.IdentityProviderRestrictions.Any()) { ExternalProviderHelper.VisibleExternalProviders = ExternalProviderHelper.VisibleExternalProviders .Where(provider => client.IdentityProviderRestrictions.Contains(provider.AuthenticationScheme)) .ToList(); } } } return(Page()); }
public LoginModel( IAuthenticationSchemeProvider schemeProvider) { ExternalProviderHelper = new ExternalProviderHelper(schemeProvider); }
public LoginModel( IAuthenticationSchemeProvider schemeProvider, IOptions <AbpAccountOptions> accountOptions) { ExternalProviderHelper = new ExternalProviderHelper(schemeProvider, accountOptions.Value); }