Class ContextAuthorization


  • public class ContextAuthorization
    extends Object
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Detail

      • clientSecret

        protected String clientSecret
      • contextToToken

        protected Map<String,​org.gcube.common.authorization.utils.secret.Secret> contextToToken
        Contains Context full name as key and Token as Value
      • tokenToContext

        protected Map<org.gcube.common.authorization.utils.secret.Secret,​String> tokenToContext
        Contains Token as key and Context full name as Value
    • Constructor Detail

      • ContextAuthorization

        public ContextAuthorization​(Properties properties)
                             throws Exception
        Contains Properties used to generate tokens
        Throws:
        Exception
      • ContextAuthorization

        public ContextAuthorization()
                             throws Exception
        Contains Properties used to generate tokens
        Throws:
        Exception
    • Method Detail

      • getCatalogueSecretForContext

        public org.gcube.common.authorization.utils.secret.Secret getCatalogueSecretForContext​(String context)
                                                                                        throws Exception
        Throws:
        Exception
      • retrieveContextsAndTokens

        protected void retrieveContextsAndTokens()
                                          throws Exception
        Throws:
        Exception
      • getSecretForContext

        public org.gcube.common.authorization.utils.secret.Secret getSecretForContext​(String context)
      • getContextFromSecret

        public String getContextFromSecret​(org.gcube.common.authorization.utils.secret.Secret secret)