improved API key handling

This commit is contained in:
2019-03-06 01:55:33 +01:00
parent 7b315f6fd0
commit a7e845d514
14 changed files with 732 additions and 140 deletions

View File

@ -0,0 +1,28 @@
package de.muehlencord.shared.account.business.account.boundary;
import org.junit.Test;
import org.slf4j.LoggerFactory;
/**
*
* @author Joern Muehlencord <joern at muehlencord.de>
*/
public class ApiKeyServiceTest {
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ApiKeyServiceTest.class);
@Test
public void testCreateApiKey() {
try {
ApiKeyService apiKeyService = new ApiKeyService();
apiKeyService.createNewApiKey("web", (short) 120);
} catch (ApiKeyException ex) {
LOGGER.error(ex.getMessage());
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Detailed stacktrace", new Object[]{ex});
}
}
}
}