Class D4ScienceIAMClientAuthn

    • Constructor Detail

      • D4ScienceIAMClientAuthn

        public D4ScienceIAMClientAuthn​(D4ScienceIAMClient iamClient,
                                       org.gcube.common.keycloak.model.TokenResponse tokenResponse)
    • Method Detail

      • authorize

        public D4ScienceIAMClientAuthz authorize​(String context)
                                          throws D4ScienceIAMClientException
        Authorizes the client or the user by using the authn already obtained, for the specific context audience and no optional permissions.
        Parameters:
        context - the requested token context audience (e.g. a specific context or another client)
        Returns:
        the authz object
        Throws:
        D4ScienceIAMClientException - if an error occurs during authz process
      • authorize

        public D4ScienceIAMClientAuthz authorize​(String context,
                                                 List<String> permissions)
                                          throws D4ScienceIAMClientException
        Authorizes the client or the user by using the authn already obtained, for the specific context audience and with optional permissions.
        Parameters:
        authn -
        context - the requested token context audience (e.g. a specific context or another client)
        permissions - the optional permissions
        Returns:
        the authz object
        Throws:
        D4ScienceIAMClientException - if an error occurs during authz process