WWWAuthenticateErrorCode.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */

  20. package org.openspcoop2.message.utils;

  21. /**    
  22.  * WWWAuthenticateErrorCode
  23.  *
  24.  * @author Poli Andrea (poli@link.it)
  25.  * @author $Author$
  26.  * @version $Rev$, $Date$
  27.  */
  28. public enum WWWAuthenticateErrorCode {

  29.          invalid_request,
  30. //       The request is missing a required parameter, includes an
  31. //       unsupported parameter or parameter value, repeats the same
  32. //       parameter, uses more than one method for including an access
  33. //       token, or is otherwise malformed.  The resource server SHOULD
  34. //       respond with the HTTP 400 (Bad Request) status code.
  35.          
  36.          invalid_token,
  37. //       The access token provided is expired, revoked, malformed, or
  38. //       invalid for other reasons.  The resource SHOULD respond with
  39. //       the HTTP 401 (Unauthorized) status code.  The client MAY
  40. //       request a new access token and retry the protected resource
  41. //       request.

  42.          insufficient_scope;
  43. //       The request requires higher privileges than provided by the
  44. //       access token.  The resource server SHOULD respond with the HTTP
  45. //       403 (Forbidden) status code and MAY include the "scope"
  46. //       attribute with the scope necessary to access the protected
  47. //       resource.

  48.    
  49. }