Class MetadataCallback

  • All Implemented Interfaces:
    java.io.Serializable, Callback, DerivableCallback

    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 value object 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
    • Constructor Detail

      • MetadataCallback

        public MetadataCallback()
      • MetadataCallback

        public MetadataCallback​(org.json.JSONObject jsonObject,
                                int index)
    • Method Detail

      • getValue

        public org.json.JSONObject getValue()
      • setAttribute

        protected void setAttribute​(java.lang.String name,
                                    java.lang.Object value)
        Specified by:
        setAttribute in class AbstractCallback
      • getType

        public java.lang.String getType()
        Description copied from interface: Callback
        Return the type of the Callback, the type name should align with the Callback type returned from AM
        Specified by:
        getType in interface Callback