Class JsonCaveatSet

java.lang.Object
org.forgerock.json.JsonValue
org.forgerock.macaroons.JsonCaveatSet
All Implemented Interfaces:
Cloneable, Iterable<JsonValue>

public class JsonCaveatSet extends JsonValue
Convenience class for constructing a set of JSON-based 1st-party caveats for use with Macaroon.addFirstPartyCaveat(JsonValue). Multiple caveats can be added to a single JSON object and appended as one unit. A JSON caveat set is a JSON object where each field in the object represent a separate caveat to be verified. For example, the JSON object

 {
     "exp": 12345,
     "aud": ["https://api.example.com/"]
 }
 
represents a caveat set containing two caveats: one that restricts the expiry time and another that restricts the audience.
  • Constructor Details

    • JsonCaveatSet

      public JsonCaveatSet()
      Constructs an empty set of caveats.
  • Method Details