public static string OpenAuthSignInUrl(this UrlHelper url, string authenticationType, string returnUrl) { if (!OpenAuthConfigurationManager.GetSection().Enabled) { return(LocalSignInUrl(url, returnUrl)); } return(url.Action("SignInOpenAuth", "Account", new { provider = authenticationType, returnUrl = GetReturnUrl(url, returnUrl), area = "Account" })); }
public override void OnActionExecuting(ActionExecutingContext filterContext) { if (!OpenAuthConfigurationManager.GetSection().Enabled&& !AdxstudioCrmConfigurationManager.GetCrmSection().IdentityModelEnabled) { filterContext.Result = new HttpNotFoundResult(); return; } base.OnActionExecuting(filterContext); }
public static string FacebookSignInUrl(this UrlHelper url) { if (!OpenAuthConfigurationManager.GetSection().Enabled) { return(LocalSignInUrl(url)); } return(OwinEnabled(url) ? url.Action("FacebookExternalLogin", "Login", new { area = "Account" }) : url.Action("SignInOpenAuth", "Account", new { provider = "facebook", returnUrl = url.Action("SignInReloadParent", "Account", new { area = "Account" }), area = "Account" })); }
private static string SignInUrlMembership(this UrlHelper url, string returnUrl = null) { if (!AdxstudioCrmConfigurationManager.GetCrmSection().MembershipProviderEnabled && !AdxstudioCrmConfigurationManager.GetCrmSection().IdentityModelEnabled && !OpenAuthConfigurationManager.GetSection().Enabled) { return(null); } var authenticationType = AdxstudioCrmConfigurationManager.GetCrmSection().LoginButtonAuthenticationType; if (_identityModelAuthenticationTypes.Contains(authenticationType, StringComparer.OrdinalIgnoreCase)) { return(FederatedSignInUrl(url, returnUrl)); } if (!string.IsNullOrWhiteSpace(authenticationType)) { return(OpenAuthSignInUrl(url, authenticationType, returnUrl)); } return(LocalSignInUrl(url, returnUrl)); }