Vault | Java SDK | JWT Endpoints
JWT Endpoints
JWT Sign
jwtSign(String id, String payload)Sign a JSON Web Token (JWT) using a key.
String payload = """
{'message': 'message to sign', 'data': 'Some extra data'}
""";
JWTSignResponse signResponse1 = client.jwtSign("keyid", payload);
JWT Verify
jwtVerify(String jws)Verify the signature of a JSON Web Token (JWT).
JWTVerifyResponse verifyResponse = client.jwtVerify(signResponse.getResult().getJws());
JWT Retrieve
jwkGet(String id)Retrieve a key in JWK format.
JWKGetResponse getResponse = client.jwkGet("jwkid");
JWT Retrieve
jwkGet(String id, String version)Retrieve a key in JWK format.
JWKGetResponse getResponse = client.jwkGet("jwkid", 2);