Class AuthorizationUtils

java.lang.Object
org.gcube.resourcemanagement.utils.AuthorizationUtils

public class AuthorizationUtils extends Object
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • CLIENT_ID_SECRET_FILENAME

      protected static final String CLIENT_ID_SECRET_FILENAME
      Configuration filename containing client credentials
      See Also:
    • CLIENT_ID_PROPERTY_NAME

      protected static final String CLIENT_ID_PROPERTY_NAME
      Property name for client ID in configuration file
      See Also:
  • Constructor Details

    • AuthorizationUtils

      public AuthorizationUtils()
  • Method Details

    • getSecret

      public static org.gcube.common.security.secrets.Secret getSecret(String context) throws Exception
      Get a Secret object for the given context using client credentials authentication
      Parameters:
      context - the target context for which to obtain the secret
      Returns:
      Secret object containing access token and context information
      Throws:
      Exception - if authentication fails or configuration is invalid