Package com.authlete.common.dto
Class AuthzDetails
- java.lang.Object
-
- com.authlete.common.dto.AuthzDetails
-
- All Implemented Interfaces:
Serializable
public class AuthzDetails extends Object implements Serializable
A class that representsauthorization_details
which is defined in "OAuth 2.0 Rich Authorization Requests".- Since:
- 2.57
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthzDetails()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthzDetails
fromJson(String json)
Build anAuthzDetails
instance from a JSON string.AuthzDetailsElement[]
getElements()
Get the elements of this authorization details.AuthzDetails
setElements(AuthzDetailsElement[] elements)
Set the elements of this authorization details.String
toJson()
Convert this instance into a JSON string.
-
-
-
Method Detail
-
getElements
public AuthzDetailsElement[] getElements()
Get the elements of this authorization details.- Returns:
- Elements of this authorization details.
-
setElements
public AuthzDetails setElements(AuthzDetailsElement[] elements)
Set the elements of this authorization details.- Parameters:
elements
- Elements of this authorization details.- Returns:
this
object.
-
toJson
public String toJson()
Convert this instance into a JSON string.The returned string contains a JSON array that represents the elements returned from
getElements()
.When the value of the elements is
null
, this method returns"null"
.- Returns:
- A JSON string.
-
fromJson
public static AuthzDetails fromJson(String json)
Build anAuthzDetails
instance from a JSON string.The following is an example of input JSON.
[ { "type" : "typ0", "locations" : ["loc0", "loc1"], "actions" : ["act0", "act1"], "identifier": "my_id", "prop0" : "a", "prop1" : ["b", "c"], "prop2" : { "sub0": "d", "sub1": ["e", "f"] } }, { "type" : "typ1" } ]
- Parameters:
json
- A JSON string.- Returns:
- An
AuthzDetails
instance built from the input JSON.
-
-