Search in sources :

Example 1 with ApiKeysRepository

use of com.nexblocks.authguard.dal.persistence.ApiKeysRepository in project AuthGuard by AuthGuard.

the class ApiKeysServiceImplTest method setup.

@BeforeEach
void setup() {
    applicationsService = Mockito.mock(ApplicationsService.class);
    apiKeysRepository = Mockito.mock(ApiKeysRepository.class);
    apiKeyExchange = Mockito.mock(ApiKeyExchange.class);
    messageBus = Mockito.mock(MessageBus.class);
    apiKeyHashProvider = new ApiKeyHashProvider(ApiKeysConfig.builder().hash(ApiKeyHashingConfig.builder().algorithm("blake2b").digestSize(32).key("test-key").build()).build());
    apiKeyHash = apiKeyHashProvider.getHash();
    serviceMapper = new ServiceMapperImpl();
    apiKeysService = new ApiKeysServiceImpl(applicationsService, apiKeyExchange, apiKeysRepository, apiKeyHashProvider, messageBus, serviceMapper);
}
Also used : ApiKeysRepository(com.nexblocks.authguard.dal.persistence.ApiKeysRepository) MessageBus(com.nexblocks.authguard.emb.MessageBus) ServiceMapperImpl(com.nexblocks.authguard.service.mappers.ServiceMapperImpl) ApiKeyHashProvider(com.nexblocks.authguard.service.keys.ApiKeyHashProvider) ApplicationsService(com.nexblocks.authguard.service.ApplicationsService) ApiKeyExchange(com.nexblocks.authguard.service.exchange.ApiKeyExchange) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ApiKeysRepository (com.nexblocks.authguard.dal.persistence.ApiKeysRepository)1 MessageBus (com.nexblocks.authguard.emb.MessageBus)1 ApplicationsService (com.nexblocks.authguard.service.ApplicationsService)1 ApiKeyExchange (com.nexblocks.authguard.service.exchange.ApiKeyExchange)1 ApiKeyHashProvider (com.nexblocks.authguard.service.keys.ApiKeyHashProvider)1 ServiceMapperImpl (com.nexblocks.authguard.service.mappers.ServiceMapperImpl)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1