Package org.wso2.carbon.webapp.mgt.sso
Class SSOUtils
java.lang.Object
org.wso2.carbon.webapp.mgt.sso.SSOUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateConsumerUrl(org.apache.catalina.connector.Request request, Properties ssoSPConfigProperties) By default this method generates the ACS url based on the application server hostname + tenant.suffix.static StringgenerateIssuerID(String contextPath) static StringgetSAMLSSOURLforApp(String requestURI, Properties ssoSPConfigProperties) static booleanstatic StringremoveTenantFromURI(String uri, String customACSUrl, String tenantName) In case an end user wishes to access a web application from a custom domain without any tenant awareness by fronting the application server with a router like Nginx, we need to detect such a scenario and remove the tenant component from all redirect URIs during the SSO flow.
-
Constructor Details
-
SSOUtils
public SSOUtils()
-
-
Method Details
-
isSSOSPConfigExists
public static boolean isSSOSPConfigExists() -
generateIssuerID
-
getSAMLSSOURLforApp
-
generateConsumerUrl
public static String generateConsumerUrl(org.apache.catalina.connector.Request request, Properties ssoSPConfigProperties) By default this method generates the ACS url based on the application server hostname + tenant.suffix. But, in case the request contains a custom HTTP header containing a different ACS url, this method will honor that url. (This kind of a scenario can happen when the end user is hoping to access a web application with a custom domain and URI through a router like Nginx.)- Parameters:
request- request objectssoSPConfigProperties- SSO properties loaded from server level sso-sp-config.properties file.- Returns:
- appropriate ACS url
-
removeTenantFromURI
In case an end user wishes to access a web application from a custom domain without any tenant awareness by fronting the application server with a router like Nginx, we need to detect such a scenario and remove the tenant component from all redirect URIs during the SSO flow.- Parameters:
uri- original URI pathcustomACSUrl- a custom HTTP header containing a different ACS urltenantName- Name of tenant that owns the web application.- Returns:
-