Search in sources :

Example 1 with TokenFactory

use of org.molgenis.data.security.auth.TokenFactory in project molgenis by molgenis.

the class DataServiceTokenServiceTest method beforeMethod.

@BeforeMethod
public void beforeMethod() {
    tokenGenerator = mock(TokenGenerator.class);
    dataService = mock(DataService.class);
    userDetailsService = mock(UserDetailsService.class);
    TokenFactory tokenFactory = mock(TokenFactory.class);
    when(tokenFactory.create()).thenAnswer(invocation -> mock(Token.class));
    tokenService = new DataServiceTokenService(tokenGenerator, dataService, userDetailsService, tokenFactory);
}
Also used : UserDetailsService(org.springframework.security.core.userdetails.UserDetailsService) Token(org.molgenis.data.security.auth.Token) TokenFactory(org.molgenis.data.security.auth.TokenFactory) DataService(org.molgenis.data.DataService) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

DataService (org.molgenis.data.DataService)1 Token (org.molgenis.data.security.auth.Token)1 TokenFactory (org.molgenis.data.security.auth.TokenFactory)1 UserDetailsService (org.springframework.security.core.userdetails.UserDetailsService)1 BeforeMethod (org.testng.annotations.BeforeMethod)1