Vault | Node.js SDK | JWT Endpoints
JWT Endpoints
JWT Retrieve
jwkGet(request: GetRequest): Promise<PangeaResponse<GetResult>>Retrieve a key in JWK format.
const response = await vault.jwkGet(
"pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"
);
JWT Sign
jwtSign(id: string, payload: string): Promise<PangeaResponse<SignResult>>Sign a JSON Web Token (JWT) using a key.
const response = await vault.jwtSign(
"pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5",
"{\"sub\": \"1234567890\",\"name\": \"John Doe\",\"admin\": true}"
);
JWT Verify
jwtVerify(jws: string): Promise<PangeaResponse<VerifyResult>>Verify the signature of a JSON Web Token (JWT).
const response = await vault.jwtVerify(
"ewogICJhbGciO..."
);