Interface EntitiesDefinition.Builder

  • Method Details

    • entityList

      An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

      If you include multiple entities with the same identifier, only the last one is processed in the request.

      Parameters:
      entityList - An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

      If you include multiple entities with the same identifier, only the last one is processed in the request.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • entityList

      EntitiesDefinition.Builder entityList(EntityItem... entityList)

      An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

      If you include multiple entities with the same identifier, only the last one is processed in the request.

      Parameters:
      entityList - An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

      If you include multiple entities with the same identifier, only the last one is processed in the request.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • entityList

      An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

      If you include multiple entities with the same identifier, only the last one is processed in the request.

      This is a convenience method that creates an instance of the EntityItem.Builder avoiding the need to create one manually via EntityItem.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to entityList(List<EntityItem>).

      Parameters:
      entityList - a consumer that will call methods on EntityItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • cedarJson

      EntitiesDefinition.Builder cedarJson(String cedarJson)

      A Cedar JSON string representation of the entities needed to successfully evaluate an authorization request.

      Example: {"cedarJson": "[{\"uid\":{\"type\":\"Photo\",\"id\":\"VacationPhoto94.jpg\"},\"attrs\":{\"accessLevel\":\"public\"},\"parents\":[]}]"}

      Parameters:
      cedarJson - A Cedar JSON string representation of the entities needed to successfully evaluate an authorization request.

      Example: {"cedarJson": "[{\"uid\":{\"type\":\"Photo\",\"id\":\"VacationPhoto94.jpg\"},\"attrs\":{\"accessLevel\":\"public\"},\"parents\":[]}]"}

      Returns:
      Returns a reference to this object so that method calls can be chained together.