PMA.UI Documentation by Pathomation

CustomLogin

PMA.UI.Authentication CustomLogin

Authenticates against a PMA.core server with a custom callback function. The caller should implement the callback method with the required parameters that authenticates to a server. The implemented function should call the success/error callbacks that are passed as parameters and return a value indicating whether this provider can handle authentication to the specified server

Constructor

new CustomLogin(context, authenticate)

Source:
Parameters:
Name Type Description
context Context
authenticate CustomLogin~authenticateCallback

Methods

authenticate(serverUrl, successopt, failureopt) → {boolean}

Source:
Authenticates against a PMA.core server. This method is usually invoked by the context itself and should rarely be used outside it.
Parameters:
Name Type Attributes Description
serverUrl string The URL of the PMA.core server to authenticate against
success function <optional>
failure function <optional>
Returns:
True or false depending on whether this instance has enough information to authenticate against this PMA.core server
Type
boolean

Type Definitions

authenticateCallback(serverUrl, successopt, failureopt) → {boolean}

Source:
The callback function used to authenticate to a server url
Parameters:
Name Type Attributes Description
serverUrl string The URL of the PMA.core server to authenticate against
success CustomLogin~authenticateSuccess <optional>
failure CustomLogin~authenticateError <optional>
Returns:
True or false depending on whether this instance has enough information to authenticate against this PMA.core server
Type
boolean

authenticateError(error)

Source:
This callback should be called when the authentication to a server failed
Parameters:
Name Type Description
error object The error occured when trying to authenticate to the server
Properties
Name Type Description
Message string The error message to display

authenticateSuccess(sessionID)

Source:
This callback should be called when the authentication to a server was successfull
Parameters:
Name Type Description
sessionID string The session id acquired by authenticating to the server