class JsonWebTokenConfig implements AuthenticationConfig {

    @Override
    public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) {
        final byte[] decodedSecretKey = Base64.getDecoder().decode(secretKey);
        final Key secretKeyKey = new SecretKeySpec(decodedSecretKey, 0, decodedSecretKey.length, this.getSignatureAlgorithm().toString());

        return new JsonWebTokenAuthFilter.Builder<>()
                .setAuthenticator(new JsonWebTokenAuthenticator(secretKeyKey, this.getSignatureAlgorithm()))
                .setAuthorizer(new PermitAllAuthorizer())
                .buildAuthFilter();
    }

    public  JsonWebTokenConfig();
    public  JsonWebTokenConfig(String secretKey);

}