![]() This pattern, known as a 'synthetic response', involves triggering an error from somewhere else in your VCL, catching it in the vcl_error subroutine, and then converting the error obj into the response that you want to send to the client. Using openssl is a great way to generate a random string: Using an HMAC key (simpler and shorter)Īn HMAC key is simply any string of your choice. You may already have this if you are already generating your JWTs at your origin server. ![]() Therefore, start by generating a secret signing key, which can be used to generate a signature for your token (and therefore validate that the token the user submits is valid). Most authentication tokens protect against manipulation using a signature, and JSON Web Tokens are no exception. However, don't be intimidated! There are several steps you can skip here if they don't apply to your use case. The solution explained on this page is a particularly comprehensive one, covering multiple use cases and potential constraints that you might want to place on your token, and is a great way to learn about the full capabilities of VCL. You are using JWTs as part of your authentication process and you want to decode and validate the tokens at the edge, so that content can be cached efficiently for all authentication states. The popular JSON Web Token format is a useful way to maintain authentication state and synchronize it between client and server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |