Class DeviceAuthorizationErrorResponse

    • Constructor Detail

      • DeviceAuthorizationErrorResponse

        protected DeviceAuthorizationErrorResponse()
        Creates a new OAuth 2.0 device authorization error response. No OAuth 2.0 error is specified.
    • Method Detail

      • getStandardErrors

        public static Set<ErrorObjectgetStandardErrors()
        Gets the standard OAuth 2.0 errors for a device authorization error response.
        Returns:
        The standard errors, as a read-only set.
      • indicatesSuccess

        public boolean indicatesSuccess()
        Description copied from interface: Response
        Checks if the response indicates success.
        Specified by:
        indicatesSuccess in interface Response
        Returns:
        true if the response indicates success, else false.
      • toJSONObject

        public net.minidev.json.JSONObject toJSONObject()
        Returns the JSON object for this token error response.
        Returns:
        The JSON object for this token error response.
      • parse

        public static DeviceAuthorizationErrorResponse parse​(net.minidev.json.JSONObject jsonObject)
                                                      throws ParseException
        Parses an OAuth 2.0 device authorization response from the specified JSON object.
        Parameters:
        jsonObject - The JSON object to parse. Its status code must not be 200 (OK). Must not be null.
        Returns:
        The token error response.
        Throws:
        ParseException - If the JSON object couldn't be parsed to an OAuth 2.0 device authorization error response.
      • parse

        public static DeviceAuthorizationErrorResponse parse​(HTTPResponse httpResponse)
                                                      throws ParseException
        Parses an OAuth 2.0 ciba authorization error, push error or token response - from the specified HTTP response.
        Parameters:
        httpResponse - The HTTP response to parse. Its status code must not be 200 (OK). Must not be null.
        Returns:
        The device authorization error response.
        Throws:
        ParseException - If the HTTP response couldn't be parsed to an OAuth 2.0 device authorization error response.