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 class
AuthorizationDetail.Builder
Builder for constructing authorisation details.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<Action>
getActions()
Returns the actions.List<DataType>
getDataTypes()
Returns the data types.Object
getField(String name)
Returns the field with the specified name.Identifier
getIdentifier()
Returns the identifier.net.minidev.json.JSONObject
getJSONObjectField(String name)
Returns the JSON object field with the specified name.List<Location>
getLocations()
Returns the locations.List<Privilege>
getPrivileges()
Returns the privileges.String
getStringField(String name)
Returns the string field with the specified name.List<String>
getStringListField(String name)
Returns the string list field with the specified name.AuthorizationType
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>
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.net.minidev.json.JSONObject
toJSONObject()
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 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,
null
if not specified.
-
getActions
public List<Action> getActions()
Returns the actions.- Returns:
- The actions as an unmodifiable list,
null
if not specified.
-
getDataTypes
public List<DataType> getDataTypes()
Returns the data types.- Returns:
- The data type as an unmodifiable list,
null
if not specified.
-
getIdentifier
public Identifier getIdentifier()
Returns the identifier.- Returns:
- The identifier,
null
if not specified.
-
getPrivileges
public List<Privilege> 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
public List<String> getStringListField(String name)
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.
-
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.
-
-