Package org.forgerock.android.auth
Interface NodeListener<T>
-
- All Superinterfaces:
FRListener<T>
- All Known Implementing Classes:
NodeListenerFuture
public interface NodeListener<T> extends FRListener<T>
Interface for an object that listens to changes resulting from aAuthService.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTAG
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetStage(java.util.List<Callback> callbacks)Workaround stage property for AM version < 7.0.default NodeonCallbackReceived(java.lang.String authServiceId, org.json.JSONObject response)Transform the response from AM Intelligent Tree to Node Object, after the transformationonCallbackReceived(Node)will be invoked with the returnedNode.voidonCallbackReceived(Node node)Notify the listener that theAuthServicehas been started and moved to the first node.default java.util.List<Callback>parseCallback(org.json.JSONArray jsonArray)Parse the JSON Array callback response from AM, and transform toCallbackinstances.-
Methods inherited from interface org.forgerock.android.auth.FRListener
onException, onSuccess
-
-
-
-
Method Detail
-
onCallbackReceived
void onCallbackReceived(Node node)
Notify the listener that theAuthServicehas been started and moved to the first node.- Parameters:
node- The first Node
-
onCallbackReceived
default Node onCallbackReceived(java.lang.String authServiceId, org.json.JSONObject response) throws java.lang.Exception
Transform the response from AM Intelligent Tree to Node Object, after the transformationonCallbackReceived(Node)will be invoked with the returnedNode.- Parameters:
authServiceId- Unique Auth Service Idresponse- The JSON Response from AM Intelligent Tree- Returns:
- The Node Object
- Throws:
java.lang.Exception- Any error during the transformation
-
parseCallback
default java.util.List<Callback> parseCallback(org.json.JSONArray jsonArray) throws java.lang.Exception
Parse the JSON Array callback response from AM, and transform toCallbackinstances.- Parameters:
jsonArray- The JSON Array callback response from AM- Returns:
- A List of
CallbackObject - Throws:
java.lang.Exception- Any error during the transformation
-
getStage
default java.lang.String getStage(java.util.List<Callback> callbacks)
Workaround stage property for AM version < 7.0. https://github.com/jaredjensen/forgerock-sdk-blog/blob/master/auth_tree_stage.md- Parameters:
callbacks- Callback from Intelligent Tree- Returns:
- stage or null if not found.
-
-