Vault | C# SDK | JWT Endpoints
JWT Endpoints
JWT Sign
VaultClient.JWTSign(string, string)Sign a JSON Web Token (JWT) using a key.
string payload = "{\"sub\": \"1234567890\",\"name\": \"John Doe\",\"admin\": true}";
var response = await client
.JWTSign("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5", payload);
JWT Verify
VaultClient.JWTVerify(JWTVerifyRequest)Verify the signature of a JSON Web Token (JWT).
var request = new JWTVerifyRequest
("ewogICJhbGciO...")
;
var verifyResponse = await client.JWTVerify(request);
JWT Retrieve
VaultClient.JWKGet(JWKGetRequest)Retrieve a key in JWK format.
var request = new JWKGetRequest
("jwkid")
.WithVersion("2")
;
var response = await client.JWKGet(request)