bertomanfreda.java-jwt.1.1.0-RELEASE.source-code.Main Maven / Gradle / Ivy
import com.github.robertomanfreda.java.jwt.JavaJWT;
import com.nimbusds.jose.Payload;
import java.util.Map;
public class Main {
public static void main(String[] args) throws Exception {
JavaJWT javaJwt = new JavaJWT("http://localhost/keystore.zip");
// generate
System.out.println();
String generated = javaJwt.generate(
"test", "test", Map.of("test", 1), 100
);
System.out.println(generated);
// verify
System.out.println();
Payload verified = javaJwt.verify(generated);
System.out.println(verified.toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy