How to generate JWT token with custom header using OOTB Token Profile Data Instance
We are using Token Profile data instance to create JSON webtoken (using the pxGenerateJWT activity). As per the pega help of Token Profile data instance ,The following required headers are added automatically:
alg – The used JWS algorithm, which is in the Security section, on the Generation tab.
cty – The content type is populated by default as application/json.
typ – The type is always JWT.
kid – The Key ID is a unique ID generated by the JWT runtime for each token generated.
crit – Headers that are marked as critical on the Generation tab.
The service which I am consuming for my application , requires us to send constant value for kid . How this can be achieved ?
We are trying to integrate with box using JWT . According to box documentation consumer needs to create a public key and store it in BOX. In turns BOX will generate an unique key (PublickeyID) which consumer needs to use for the generation(to sign the claims using the private key, we need to use PublickeyID as kid value) of the JWT. You may find their documentation from the URL below.