ClaimsNegoziazione.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.pdd.core.token.parser;

  21. import java.util.ArrayList;
  22. import java.util.List;

  23. /**    
  24.  * Claims
  25.  *
  26.  * @author Poli Andrea (poli@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */
  30. public class ClaimsNegoziazione {

  31.     // https://tools.ietf.org/html/rfc6749
  32.    
  33.     public static final String OAUTH2_RFC_6749_ACCESS_TOKEN = "access_token";
  34.     public static final String OAUTH2_RFC_6749_REFRESH_TOKEN = "refresh_token";
  35.     public static final String OAUTH2_RFC_6749_TOKEN_TYPE = "token_type";
  36.     public static final String OAUTH2_RFC_6749_EXPIRES_IN = "expires_in";
  37.     public static final String OAUTH2_RFC_6749_SCOPE = "scope";
  38.    
  39.     public static final String AZURE_EXPIRES_ON = "expires_on"; // azure (https://learn.microsoft.com/en-us/azure/container-apps/managed-identity?tabs=portal%2Chttp#connect-to-azure-services-in-app-code)
  40.    
  41.     public static final List<String> REFRESH_EXPIRE_IN_CUSTOM_CLAIMS = new ArrayList<>();
  42.     static {
  43.         REFRESH_EXPIRE_IN_CUSTOM_CLAIMS.add("refresh_expires_in"); //keyclock
  44.     }
  45.    
  46.     public static final List<String> REFRESH_EXPIRE_ON_CUSTOM_CLAIMS = new ArrayList<>();
  47.     static {
  48.         REFRESH_EXPIRE_ON_CUSTOM_CLAIMS.add("refresh_expires_on");
  49.     }
  50.    
  51.     public static final String OAUTH2_RFC_6749_REQUEST_GRANT_TYPE = "grant_type";
  52.     public static final String OAUTH2_RFC_6749_REQUEST_GRANT_TYPE_CLIENT_CREDENTIALS_GRANT = "client_credentials";
  53.     public static final String OAUTH2_RFC_6749_REQUEST_GRANT_TYPE_RESOURCE_OWNER_PASSWORD_CREDENTIALS_GRANT = "password";
  54.     public static final String OAUTH2_RFC_6749_REQUEST_GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
  55.     public static final String OAUTH2_RFC_6749_REQUEST_USERNAME = "username";
  56.     public static final String OAUTH2_RFC_6749_REQUEST_PASSWORD = "password";
  57.     public static final String OAUTH2_RFC_6749_REQUEST_CLIENT_ID = "client_id";
  58.     public static final String OAUTH2_RFC_6749_REQUEST_CLIENT_SECRET = "client_secret";
  59.     public static final String OAUTH2_RFC_6749_REQUEST_SCOPE = "scope";
  60.     public static final String OAUTH2_RFC_6749_REQUEST_AUDIENCE = "audience"; // es. https://auth0.com/docs/api-auth/tutorials/client-credentials
  61.    
  62.     public static final String OAUTH2_RFC_6749_REQUEST_CLIENT_ASSERTION_TYPE = "client_assertion_type";
  63.     public static final String OAUTH2_RFC_6749_REQUEST_CLIENT_ASSERTION_TYPE_RFC_7523 = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
  64.     public static final String OAUTH2_RFC_6749_REQUEST_CLIENT_ASSERTION = "client_assertion";
  65.    
  66. }