Newer Version Available

This content describes an older version of this product. View Latest

LoginFormController Class

Represents a login form. For internal use only.

Namespace

AppLauncher

LoginFormController Methods

The following are methods for LoginFormController.

getForgotPasswordUrl()

Returns the path to the forgot password form.

Signature

public static String getForgotPasswordUrl()

Return Value

Type: String

getIsSelfRegistrationEnabled()

Indicates whether the login form contains a link to a self-registration form.

Signature

public static Boolean getIsSelfRegistrationEnabled()

Return Value

Type: Boolean

getIsUsernamePasswordEnabled()

Indicates whether users can log in with a username and password.

Signature

public static Boolean getIsUsernamePasswordEnabled()

Return Value

Type: Boolean

getSelfRegistrationUrl()

Returns the path to the self-registration page.

Signature

public static String getSelfRegistrationUrl()

Return Value

Type: String

login(username, password, startUrl)

Logs in the user with the provided username, password, and path to the page that users see after they log in.

Signature

public static String login(String username, String password, String startUrl)

Parameters

username
Type: String
The username.
password
Type: String
The password.
startUrl
Type: String
The path to the page that users see after they log in.

Return Value

Type: String

loginGetPageRefUrl(username, password, startUrl)

Logs in the user using the specified username and password. If login is successful in a Lightning environment, the user is redirected to the page specified in the startUrl. In a non-Lightning environment, use the startUrl returned by the method to program a redirect. If login fails, an error string is returned.

Signature

public static String loginGetPageRefUrl(String username, String password, String startUrl)

Parameters

username
Type: String
The username.
password
Type: String
The password.
startUrl
Type: String
The path to the page that users see after they log in.

Return Value

Type: String

Will return a string of URL when the user login succeeds, or an error message when the user login fails.

Note