public class AuthzDetailsElement extends Object implements Serializable
authorization_details
which is defined in "OAuth 2.0 Rich Authorization Requests".| Constructor and Description |
|---|
AuthzDetailsElement() |
| Modifier and Type | Method and Description |
|---|---|
static AuthzDetailsElement |
fromJson(String json)
Build an
AuthzDetailsElement instance from a JSON string. |
String[] |
getActions()
Get the actions.
|
String[] |
getDataTypes()
Get the data types.
|
String |
getIdentifier()
Get the identifier of a specific resource.
|
String[] |
getLocations()
Get the resources and/or resource servers.
|
String |
getOtherFields()
Get the other fields (than the pre-defined ones such as
type
and locations) as a string in the JSON format. |
Map<?,?> |
getOtherFieldsAsMap()
|
String[] |
getPrivileges()
Get the types or levels of privilege.
|
String |
getType()
Get the type of this element.
|
AuthzDetailsElement |
setActions(String[] actions)
Set the actions.
|
AuthzDetailsElement |
setDataTypes(String[] dataTypes)
Set the data types.
|
AuthzDetailsElement |
setIdentifier(String identifier)
Set the identifier of a specific resource.
|
AuthzDetailsElement |
setLocations(String[] locations)
Set the resources and/or resource servers.
|
AuthzDetailsElement |
setOtherFields(String otherFields)
Set the other fields (than the pre-defined ones such as
type
and locations) as a string in the JSON format. |
AuthzDetailsElement |
setOtherFieldsFromMap(Map<?,?> otherFields)
|
AuthzDetailsElement |
setPrivileges(String[] privileges)
Set the types or levels of privilege.
|
AuthzDetailsElement |
setType(String type)
Set the type of this element.
|
String |
toJson()
Convert this instance into a JSON string.
|
public String getType()
From "OAuth 2.0 Rich Authorization Requests":
"The type of authorization data as a string. This field MAY define which other elements are allowed in the request. This element is REQUIRED."
public AuthzDetailsElement setType(String type)
From "OAuth 2.0 Rich Authorization Requests":
"The type of authorization data as a string. This field MAY define which other elements are allowed in the request. This element is REQUIRED."
type - The type of this element.this object.public String[] getLocations()
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the location of the resource or resource server. These strings are typically URIs identifying the location of the RS."
public AuthzDetailsElement setLocations(String[] locations)
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the location of the resource or resource server. These strings are typically URIs identifying the location of the RS."
locations - The resources and/or resource servers.this object.public String[] getActions()
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the kinds of actions to be taken at the resource."
public AuthzDetailsElement setActions(String[] actions)
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the kinds of actions to be taken at the resource."
actions - The actions.this object.public String[] getDataTypes()
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the kinds of data being requested from the resource."
public AuthzDetailsElement setDataTypes(String[] dataTypes)
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the kinds of data being requested from the resource."
dataTypes - The data types.this object.public String getIdentifier()
From "OAuth 2.0 Rich Authorization Requests":
"A string identifier indicating a specific resource available at the API."
public AuthzDetailsElement setIdentifier(String identifier)
From "OAuth 2.0 Rich Authorization Requests":
"A string identifier indicating a specific resource available at the API."
identifier - The identifier of a specific resource.this object.public String[] getPrivileges()
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the types or levels of privilege being requested at the resource."
public AuthzDetailsElement setPrivileges(String[] privileges)
From "OAuth 2.0 Rich Authorization Requests":
"An array of strings representing the types or levels of privilege being requested at the resource."
privileges - Types or levels of privilege.this object.public String getOtherFields()
type
and locations) as a string in the JSON format.
The content varies depending on the type field.
null.getOtherFieldsAsMap()public AuthzDetailsElement setOtherFields(String otherFields)
type
and locations) as a string in the JSON format.
The content varies depending on the type field.
otherFields - Other fields in the JSON format.this object.public Map<?,?> getOtherFieldsAsMap()
type, locations,
actions and identifier) as a Map object.
The content varies depending on the type field.
Map object. This may be null.getOtherFields()public AuthzDetailsElement setOtherFieldsFromMap(Map<?,?> otherFields)
type, locations,
actions and identifier) using a Map
object. The internal value is stored as a string serialization
of the Map object.
The content varies depending on the type field.
otherFields - A Map instance holding other fields.this object.getOtherFieldsAsMap()public String toJson()
"Other fields" (the string returned from getOtherFields() are
expanded into the output JSON.
public static AuthzDetailsElement fromJson(String json)
AuthzDetailsElement instance from a JSON string.
The following is an example of input JSON.
{
"type" : "my_type",
"locations" : ["loc0", "loc1"],
"actions" : ["act0", "act1"],
"identifier": "my_id",
"prop0" : "a",
"prop1" : ["b", "c"],
"prop2" : {
"sub0": "d",
"sub1": ["e", "f"]
}
}
json - A JSON string.AuthzDetailsElement instance built from the input JSON.Copyright © 2022. All rights reserved.