if (location.href.indexOf('is-external=true') == -1) { parent.document.; } //-->
allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //-->
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
com.worklight.wlclient.api
Interface WLResponseListener
- All Known Implementing Classes:
- GatewayChallengeHandler
public interface WLResponseListener
This interface defines methods that the listener for the
WLClientandGatewayChallengeHandler
.WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener)implements to receive notifications about the success or failure of the method call.
Method Summary
Methods Modifier and Type Method and Description void onFailure(WLFailResponse response)Called if any failure occurred during the execution of the
WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener). void onSuccess(WLResponse response)Called following successful calls to the
WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener).
Method Detail
onSuccess
void onSuccess(WLResponse response)
Called following successful calls to the
WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener).This method is also the success delegate for
GatewayChallengeHandler#submitLoginForm(String, Map, Map, int, String) or ForGatewayChallengeHandler, this method is called when a successful HTTP response is received (200 OK). This method does not indicate whether the challenge was successful or not. A 200 HTTP response can flow back indicating problems with authentication on the server or requesting additional information. Some examples of a 200 HTTP response are as follows:
- First init request returns a normal 200 HTTP response that requests a PKMS login form.
- Authentication failed on the server.
- A 200 HTTP response, indicating that the account is locked on the server due to too many failed login attempts.
Note: MobileFirst Platform does not attempt to determine what the 200 response means. This is a good place to check whether the response is a custom response and handle it accordingly. If the response is not a custom response, we can call
submitSuccessto indicate that everything is OK from your challenge handler's perspective, and that the MobileFirst Platform can handle the response instead.
- Response that the server returns, along with any invocation context object and status.
- Parameters:
response
onFailure
void onFailure(WLFailResponse response)
Called if any failure occurred during the execution of the
WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener).This method is the failure delegate for
GatewayChallengeHandler#submitLoginForm(java.lang.String requestURL, java.util.Map requestParameters, java.util.Map requestHeaders, int requestTimeoutInMilliseconds, java.lang.String requestMethod) orFor
GatewayChallengeHandler, this method is called when a response does not have a 200 HTTP status code. This method does not indicate whether the challenge was successful or not. In some casesonFailure is an indication of a normal challenge handling sequence. An example of when theonFailure
method is called is when a 401 unauthorized response is received. A successful handshake can entail several 401 response iterations and therefore severalonFailure calls. This behavior is all part of the normal handshake between two parties that are trying to establish identity. MobileFirst Platform handles the handshakes for core challenges iteratively until all of the credentials are established and the necessary challenges are processed. This is a good place to check whether the response is a custom response and handle it accordingly. If the response is not a custom response, we can callsubmitSuccess to indicate that everything is OK from your challenge handler's perspective, and that MobileFirst Platform can handle the response instead.
- Parameters:
response - Response that contains the error code and error message. Optionally, it can also contain the results from the server and any invocation context object and status.
allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //-->
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
© Copyright IBM Corp. 2006, 2015. All Rights Reserved.