class JsonWebTokenAuthenticator implements Authenticator<String, Principal> {

    public static String createJwtToken(SignatureAlgorithm alg, Key secretKey, Principal principal) {
        return Jwts.builder().setSubject(principal.getName()).signWith(alg, secretKey).compact();
    }

    public  JsonWebTokenAuthenticator(Key secretKey, SignatureAlgorithm algorithm);

}