Search in sources :

Example 6 with User

use of com.gmoon.resourceserver.user.User in project Toy by gmoon92.

the class BaseIntegrationTest method beforeAll.

@BeforeAll
static void beforeAll(@Autowired UserRepository repository, @Autowired JwtUtils jwtUtils) {
    User admin = repository.findByUsername("admin");
    TOKEN_OF_ADMIN = new Token(jwtUtils.generate(admin));
}
Also used : User(com.gmoon.resourceserver.user.User) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

User (com.gmoon.resourceserver.user.User)6 JWTVerificationException (com.auth0.jwt.exceptions.JWTVerificationException)2 JwtVerifyException (com.gmoon.resourceserver.jwt.exception.JwtVerifyException)2 BeforeAll (org.junit.jupiter.api.BeforeAll)2 UsernamePasswordAuthenticationToken (org.springframework.security.authentication.UsernamePasswordAuthenticationToken)2 Authentication (org.springframework.security.core.Authentication)2