Class MetadataCallback
- java.lang.Object
-
- org.forgerock.android.auth.callback.AbstractCallback
-
- org.forgerock.android.auth.callback.MetadataCallback
-
- All Implemented Interfaces:
java.io.Serializable,Callback,DerivableCallback
- Direct Known Subclasses:
WebAuthnAuthenticationCallback,WebAuthnRegistrationCallback
public class MetadataCallback extends AbstractCallback implements DerivableCallback
A callback that allows some extra metadata to be sent in the response.When serialized as JSON in an authenticate response, the
valueobject will be the value of a single data output value, so for a value of{ "foo": "bar" }, this would be output as:{ "authId": "...", "callbacks": [ // ... { "type": "MetadataCallback", "output": [ { "name": "data", "value": { "foo": "bar" } } ] } ] }- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.forgerock.android.auth.callback.AbstractCallback
_id, content, VALUE
-
-
Constructor Summary
Constructors Constructor Description MetadataCallback()MetadataCallback(org.json.JSONObject jsonObject, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends Callback>getDerivedCallback()Retrieve the derived callback class, return null if no derive callback found.java.lang.StringgetType()Return the type of the Callback, the type name should align with the Callback type returned from AMorg.json.JSONObjectgetValue()protected voidsetAttribute(java.lang.String name, java.lang.Object value)-
Methods inherited from class org.forgerock.android.auth.callback.AbstractCallback
get_id, getContent, getContentAsJson, getInputValue, getInputValue, getName, setContent, setValue, setValue
-
-
-
-
Method Detail
-
getValue
public org.json.JSONObject getValue()
-
setAttribute
protected void setAttribute(java.lang.String name, java.lang.Object value)- Specified by:
setAttributein classAbstractCallback
-
getType
public java.lang.String getType()
Description copied from interface:CallbackReturn the type of the Callback, the type name should align with the Callback type returned from AM
-
getDerivedCallback
public java.lang.Class<? extends Callback> getDerivedCallback()
Description copied from interface:DerivableCallbackRetrieve the derived callback class, return null if no derive callback found.- Specified by:
getDerivedCallbackin interfaceDerivableCallback
-
-