Class AuthzDetails

  • All Implemented Interfaces:
    Serializable

    public class AuthzDetails
    extends Object
    implements Serializable
    A class that represents authorization_details which is defined in "OAuth 2.0 Rich Authorization Requests".
    Since:
    2.57
    See Also:
    Serialized Form
    • Constructor Detail

      • AuthzDetails

        public AuthzDetails()
    • 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 an AuthzDetails 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.