Package com.nimbusds.oauth2.sdk.rar
Class AuthorizationDetail
java.lang.Object
com.nimbusds.oauth2.sdk.rar.AuthorizationDetail
Authorisation detail.
Related specifications:
- OAuth 2.0 Rich Authorization Requests (RFC 9396)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for constructing authorisation details. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the actions.Returns the data types.Returns the field with the specified name.Returns the identifier.net.minidev.json.JSONObject
getJSONObjectField
(String name) Returns the JSON object field with the specified name.Returns the locations.Returns the privileges.getStringField
(String name) Returns the string field with the specified name.getStringListField
(String name) Returns the string list field with the specified name.getType()
Returns the type.int
hashCode()
static AuthorizationDetail
parse
(net.minidev.json.JSONObject jsonObject) Parses an authorisation detail from the specified JSON object.static List<AuthorizationDetail>
Parses an authorisation details list from the specified JSON array string.static List<AuthorizationDetail>
Parses an authorisation details list from the specified JSON objects list.static net.minidev.json.JSONArray
toJSONArray
(List<AuthorizationDetail> details) Returns the JSON array representation of the specified authorisation details.net.minidev.json.JSONObject
Returns a JSON object representation of this authorisation detail.static String
toJSONString
(List<AuthorizationDetail> details) Returns the JSON array string representation of the specified authorisation details.
-
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
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
Returns the field with the specified name.- Parameters:
name
- The field name.- Returns:
- The field value,
null
if not specified.
-
getStringField
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
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
Returns a JSON object representation of this authorisation detail.- Returns:
- The JSON object.
-
equals
-
hashCode
-
toJSONArray
Returns the JSON array representation of the specified authorisation details.- Parameters:
details
- The authorisation details. Must not benull
.- Returns:
- The JSON array.
-
toJSONString
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
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.
-