Package com.nimbusds.oauth2.sdk.rar
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthorizationDetail.BuilderBuilder for constructing authorisation details.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<Action>getActions()Returns the actions.List<DataType>getDataTypes()Returns the data types.ObjectgetField(String name)Returns the field with the specified name.IdentifiergetIdentifier()Returns the identifier.net.minidev.json.JSONObjectgetJSONObjectField(String name)Returns the JSON object field with the specified name.List<Location>getLocations()Returns the locations.List<Privilege>getPrivileges()Returns the privileges.StringgetStringField(String name)Returns the string field with the specified name.List<String>getStringListField(String name)Returns the string list field with the specified name.AuthorizationTypegetType()Returns the type.inthashCode()static AuthorizationDetailparse(net.minidev.json.JSONObject jsonObject)Parses an authorisation detail from the specified JSON object.static List<AuthorizationDetail>parseList(String json)Parses an authorisation details list from the specified JSON array string.static List<AuthorizationDetail>parseList(List<net.minidev.json.JSONObject> jsonObjects)Parses an authorisation details list from the specified JSON objects list.static net.minidev.json.JSONArraytoJSONArray(List<AuthorizationDetail> details)Returns the JSON array representation of the specified authorisation details.net.minidev.json.JSONObjecttoJSONObject()Returns a JSON object representation of this authorisation detail.static StringtoJSONString(List<AuthorizationDetail> details)Returns the JSON array string representation of the specified authorisation details.
-
-
-
Method Detail
-
getType
public AuthorizationType getType()
Returns the type.- Returns:
- The type.
-
getLocations
public List<Location> getLocations()
Returns the locations.- Returns:
- The locations as an unmodifiable list,
nullif not specified.
-
getActions
public List<Action> getActions()
Returns the actions.- Returns:
- The actions as an unmodifiable list,
nullif not specified.
-
getDataTypes
public List<DataType> getDataTypes()
Returns the data types.- Returns:
- The data type as an unmodifiable list,
nullif not specified.
-
getIdentifier
public Identifier getIdentifier()
Returns the identifier.- Returns:
- The identifier,
nullif not specified.
-
getPrivileges
public List<Privilege> getPrivileges()
Returns the privileges.- Returns:
- The privileges as an unmodifiable list,
nullif not specified.
-
getField
public Object getField(String name)
Returns the field with the specified name.- Parameters:
name- The field name.- Returns:
- The field value,
nullif 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,
nullif not specified or parsing failed.
-
getStringListField
public List<String> getStringListField(String name)
Returns the string list field with the specified name.- Parameters:
name- The field name.- Returns:
- The field value,
nullif 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,
nullif 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.
-
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 benull.- 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 benull.- 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 benull.- 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 benull.- 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 benull.- Returns:
- The authorisation details, as unmodifiable list.
- Throws:
ParseException- If parsing failed.
-
-