I have been reading the JWT RFC, and in section 3.1 they give an example JWT along with the MAC.

I was wondering if: is it known what is the value of the secret key that they used with SHA-256 to generate the example in RFC?

I want to use the example in a test case so I'd like to reproduce it exactly.

有帮助吗?

解决方案

Turns out the key is given in Appendix 1.1 of the draft for "JSON Web Signature (JWS)" in the JSON Web Key format as:

{
    "kty":"oct",
    "k":"AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow"
}

I misunderstood that the two links named "Appendix A.1" at the end of the "JWT Example" section actually go to different locations. Tha passage with the links is reproduced below:


This computation is illustrated in more detail in Appendix A.1 of [JWS]. See Appendix A.1 for an example of an encrypted JWT.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top