class JwtTokenUtil {

    public String generateToken(UserDetails userDetails) {
        Map<String, Object> claims = new HashMap<>();
        claims.put(CLAIM_KEY_ROLES, userDetails.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(joining(ROLES_CLAIM_DELIMITER)));
        
        log.info("generateToken()");
        
        return doGenerateToken(userDetails.getUsername(), claims);
    }

}