29 lines
881 B
Java
29 lines
881 B
Java
package org.gcube.gcat.utils;
|
|
|
|
import org.gcube.common.authorization.utils.manager.SecretManager;
|
|
import org.gcube.common.encryption.encrypter.StringEncrypter;
|
|
import org.gcube.gcat.ContextTest;
|
|
import org.junit.Test;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
public class ConstantsTest extends ContextTest {
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(ConstantsTest.class);
|
|
|
|
@Test
|
|
public void testGetApplicationToken() throws Exception {
|
|
logger.debug("Application token for Context {} is {}", SecretManager.instance.get().getContext(),
|
|
Constants.getCatalogueSecurityToken());
|
|
}
|
|
|
|
|
|
@Test
|
|
public void decrypt() throws Exception {
|
|
StringEncrypter stringEncrypter = StringEncrypter.getEncrypter();
|
|
String decrypted = stringEncrypter.decrypt("w0KVc+78b2yUQsndDh/cXyyRquuwyILTygmoF0Y5Dls=");
|
|
logger.debug("{}", decrypted);
|
|
|
|
}
|
|
}
|