MicroStrategy ONE

getCustomLoginURL

The getCustomLoginURL method gets called if a custom implementation of the handlesAuthenticationRequest method returns USE_CUSTOM_LOGIN_PAGE. The getCustomLoginURL method gives MicroStrategy Web the URL of the custom log-in page that will handle the authentication request. The person performing the customization must provide the custom log-in page that is referenced in the URL (either internal or external to MicroStrategy Web), as well as the logic to process the user credentials and return to MicroStrategy Web once the credentials are validated. This method is used only by a custom External Security class and not by the default External Security class.

The following information is provided to help you use this method when you create a custom ESM.

Method signature

Copy
public String getCustomLoginURL(String originalURL, String desiredServer, int desiredPort, String desiredProject)

Parameters

The following parameters are passed into thegetCustomLoginURLmethod:

  • originalURL

    This parameter specifies the original URL that triggered this security exchange. It allows the ESM to redirect back to the original URL, as long as the ESM has embedded the value of the originalURL parameter into the URL that it returns.  

  • desiredServer

    This parameter specifies the name or IP address of the Intelligence Server on which the user session should be created and maintained.  

  • desiredPort

    This parameter specifies the number of the port that should be used to connect to the Intelligence Server on which the user session should be created and maintained.

  • desiredProject

    This parameter specifies the name of the project for which the user is authenticated and for which the user session is created.

Return values

The getCustomLoginURL method must return the URL of the custom log-in page that will collect and validate the user credentials that are supplied. The construction of the URL is the responsibility of the custom ESM. The default implementation of this method returns NULL.

The custom log-in page can be internal to MicroStrategy Web, or it can be part of an external application. In either case, an external application must validate the supplied credentials and provide the page to which the user will be redirected if validation is successful. The user may be redirected to a custom home page or sent back to the original URL that triggered this security exchange. In the latter case, the ESM should embed the value of the originalURL parameter into the URL that it returns. MicroStrategy Web needs to send to the external application all of the values that it may need for authentication. If MicroStrategy Web collects a server or a project preference from the user (through the Project List page or a bookmarked URL), then those values are supplied back to the ESM. If the ESM wants to use these values inside the custom log-in implementation, the values of these parameters should be embedded into the URL as well.

This method is never executed during the default authentication workflow since the default MicroStrategy Web log-in page should be used. If you implement a custom ESM that returns USE_CUSTOM_LOGIN_PAGE in handlesAuthenticationRequest, you must also override this method to return a valid URL.

Pre-conditions

This call is made only when the following condition is true:

Post-operations

The application redirects the user to the URL returned by the method (either the original URL, the URL of a different internal page, or the URL of an external page).