SAML SSO doesn’t require a new browser tab to be opened. Typically the SSO flow occurs in the same browser window. If you wish to open a new tab, your application needs to return to the browser the appropriate HTML or JavaScript to make this happen. Once the user clicks the link or button etc and the HTTP request in the new browser tab comes back to your application, you call our SAML API to initiate SSO. There are many ways to do this. The following demonstrates one possibility. The HTML body includes a link that the browser will open in a new tab. <body> <h1>Login to the Service Provider</h1> <a href="/InitiateSSO.aspx" target="_blank">SSO to the Identity Provider</a> </body>
The code behind for this page initiates SSO in this newly opened tab. protected void Page_Load(object sender, EventArgs e) { // Remember the return URL. string returnUrl = Request.QueryString["ReturnUrl"]; // To login at the service provider, initiate single sign-on to the identity provider (SP-initiated SSO). string partnerIdP = WebConfigurationManager.AppSettings[AppSettings.PartnerIdP]; SAMLServiceProvider.InitiateSSO(Response, returnUrl, partnerIdP); }
Regards ComponentSpace Development
|