Class AuthorizationDetail

java.lang.Object
com.nimbusds.oauth2.sdk.rar.AuthorizationDetail

public class AuthorizationDetail extends Object
Authorisation detail.

Related specifications:

  • OAuth 2.0 Rich Authorization Requests (RFC 9396), section 2.
  • Method Details

    • getType

      Returns the type.
      Returns:
      The type.
    • getLocations

      Returns the locations.
      Returns:
      The locations as an unmodifiable list, null if not specified.
    • getActions

      public List<Action> getActions()
      Returns the actions.
      Returns:
      The actions as an unmodifiable list, null if not specified.
    • getDataTypes

      Returns the data types.
      Returns:
      The data type as an unmodifiable list, null if not specified.
    • getIdentifier

      Returns the identifier.
      Returns:
      The identifier, null if not specified.
    • getPrivileges

      Returns the privileges.
      Returns:
      The privileges as an unmodifiable list, null if not specified.
    • getField

      public Object getField(String name)
      Returns the field with the specified name.
      Parameters:
      name - The field name.
      Returns:
      The field value, null if not specified.
    • getStringField

      public String getStringField(String name)
      Returns the string field with the specified name.
      Parameters:
      name - The field name.
      Returns:
      The field value, null if not specified or parsing failed.
    • getStringListField

      Returns the string list field with the specified name.
      Parameters:
      name - The field name.
      Returns:
      The field value, null if not specified or parsing failed.
    • getJSONObjectField

      public net.minidev.json.JSONObject getJSONObjectField(String name)
      Returns the JSON object field with the specified name.
      Parameters:
      name - The field name.
      Returns:
      The field value, null if not specified or parsing failed.
    • toJSONObject

      public net.minidev.json.JSONObject toJSONObject()
      Returns a JSON object representation of this authorisation detail.
      Returns:
      The JSON object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toJSONArray

      public static net.minidev.json.JSONArray toJSONArray(List<AuthorizationDetail> details)
      Returns the JSON array representation of the specified authorisation details.
      Parameters:
      details - The authorisation details. Must not be null.
      Returns:
      The JSON array.
    • toJSONString

      public static String toJSONString(List<AuthorizationDetail> details)
      Returns the JSON array string representation of the specified authorisation details.
      Parameters:
      details - The authorisation details. Must not be null.
      Returns:
      The JSON string.
    • parse

      public static AuthorizationDetail parse(net.minidev.json.JSONObject jsonObject) throws ParseException
      Parses an authorisation detail from the specified JSON object.
      Parameters:
      jsonObject - The JSON object. Must not be null.
      Returns:
      The authorisation detail.
      Throws:
      ParseException - If parsing failed.
    • parseList

      public static List<AuthorizationDetail> parseList(List<net.minidev.json.JSONObject> jsonObjects) throws ParseException
      Parses an authorisation details list from the specified JSON objects list.
      Parameters:
      jsonObjects - The JSON objects list. Must not be null.
      Returns:
      The authorisation details, as unmodifiable list.
      Throws:
      ParseException - If parsing failed.
    • parseList

      public static List<AuthorizationDetail> parseList(String json) throws ParseException
      Parses an authorisation details list from the specified JSON array string.
      Parameters:
      json - The JSON string. Must not be null.
      Returns:
      The authorisation details, as unmodifiable list.
      Throws:
      ParseException - If parsing failed.