Class WL.Client.AbstractChallengeHandler
WL.Client.AbstractChallengeHandler
- Description:
- Creates challengeHandler object using
WL.Client.createChallengeHandler(realmName)
to call methods of this class.
Method Attributes | Method Name and Description |
---|---|
handleChallenge(challenge)
If
isCustomResponse returns TRUE, the MobileFirst framework calls handleChallenge() . |
|
isCustomResponse(transport)
Called each time that a response is received from the server.
|
|
submitAdapterAuthentication(invocationData, options)
Used to send collected credentials to a specific adapter procedure.
|
|
submitFailure(err)
Notifies the MobileFirst framework that the authentication process completed with failure.
|
|
submitLoginForm(reqURL, options, submitLoginFormCallback)
Used to send collected credentials to a specific URL.
|
|
Used to notify the MobileFirst framework that the authentication successfully finished.
|
Method Detail
handleChallenge
handleChallenge(challenge)
If
isCustomResponse
returns TRUE, the MobileFirst framework calls handleChallenge()
. This function is used to perform required actions,
such as hiding the application screen, displaying the login screen, or other actions required to pass the challenge successfully.
- Parameters:
- challenge - Challenge to handle
isCustomResponse
isCustomResponse(transport)
Called each time that a response is received from the server.
It is used to detect whether the response contains data that is related to this challenge handler, and returns TRUE if so, and FALSE if not.
- Parameters:
- transport - Response that arrived from the server
- Returns:
- true if the response is a challange that this handler handles
submitAdapterAuthentication
submitAdapterAuthentication(invocationData, options)
Used to send collected credentials to a specific adapter procedure. It has the same signature as the
WL.Client.invokeProcedure() function.
- Parameters:
-
invocationData
- Mandatory. A JSON block of parameters.
{
adapter : adapter-name.wlname,
procedure : adapter-name.procedure-name.wlname,
parameters : [],
}
-
options
- Optional. Parameters hash.
submitFailure
submitFailure(err)
Notifies the MobileFirst framework that the authentication process completed with failure.
The MobileFirst framework then disposes of the original request that triggered the authentication.
- Parameters:
-
err
- Error message if available
submitLoginForm
submitLoginForm(reqURL, options, submitLoginFormCallback)
Used to send collected credentials to a specific URL. The developer can also specify request parameters, headers, and callback.
- Parameters:
-
reqURL
- URL to send data to
-
options
- Other options like timeout, extra headers
-
submitLoginFormCallback
- Callback method when opration is done
submitSuccess
submitSuccess()
Used to notify the MobileFirst framework that the authentication successfully finished.
The MobileFirst framework then automatically issues the original request that triggered the authentication.
© Copyright IBM Corp. 2011, 2015.