USERNAMESAREOLDSCHOOL
Jan 29, 2021, 1:15 PM
Hey folks!
I'm currently trying to add, besides our ext.net "form" authentication, a simple Single Sign-On via Azure Active Directory following this document: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v2-aspnet-webapp
I've already added the appropriate login/logout controller methods and the startup-config, but I'm still not getting redirected to the SSO login page. Maybe I'm missing anything regarding the coexistence of forms authentication or what am I doing wrong?
My login.aspx page has the following SSO button implemented:
<ext:FormPanel runat="server" FormID="Form_SSO" Border="false" Layout="HBoxLayout" PaddingSpec="10" MarginSpec="0 0 8 0">
<Items>
<ext:Button ID="ButtonSingleSignOn" runat="server" Text="Login" Icon="Key" Height="25" Flex="1" AutoPostBack="true">
<DirectEvents>
<Click Url="/User/Login" Timeout="60000" Method="POST" Before="Ext.Msg.wait('Redirecting ...', 'SSO Authentication');">
<ExtraParams>
<ext:Parameter Name="ReturnUrl" Value="GetReturnUrl()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:FormPanel>
----- textbox/password and login button providing forms authentication -----
The appropriate UserController method:
[AcceptVerbs(HttpVerbs.Post)]
public void Login(string returnUrl)
{
if (!Request.IsAuthenticated)
{
HttpContext.GetOwinContext().Authentication.Challe nge(
new AuthenticationProperties { RedirectUri = returnUrl },
OpenIdConnectAuthenticationDefaults.Authentication Type);
}
}
Any help would be highly appreciated, thanks!
I'm currently trying to add, besides our ext.net "form" authentication, a simple Single Sign-On via Azure Active Directory following this document: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v2-aspnet-webapp
I've already added the appropriate login/logout controller methods and the startup-config, but I'm still not getting redirected to the SSO login page. Maybe I'm missing anything regarding the coexistence of forms authentication or what am I doing wrong?
My login.aspx page has the following SSO button implemented:
<ext:FormPanel runat="server" FormID="Form_SSO" Border="false" Layout="HBoxLayout" PaddingSpec="10" MarginSpec="0 0 8 0">
<Items>
<ext:Button ID="ButtonSingleSignOn" runat="server" Text="Login" Icon="Key" Height="25" Flex="1" AutoPostBack="true">
<DirectEvents>
<Click Url="/User/Login" Timeout="60000" Method="POST" Before="Ext.Msg.wait('Redirecting ...', 'SSO Authentication');">
<ExtraParams>
<ext:Parameter Name="ReturnUrl" Value="GetReturnUrl()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:FormPanel>
----- textbox/password and login button providing forms authentication -----
The appropriate UserController method:
[AcceptVerbs(HttpVerbs.Post)]
public void Login(string returnUrl)
{
if (!Request.IsAuthenticated)
{
HttpContext.GetOwinContext().Authentication.Challe nge(
new AuthenticationProperties { RedirectUri = returnUrl },
OpenIdConnectAuthenticationDefaults.Authentication Type);
}
}
Any help would be highly appreciated, thanks!