I am successfully authenticating user requests to my KeystoneJS API with the approach outlined here.
However I need to add a custom express endpoint to my application, which should only accessible to users with a valid token in their request header (see this previous answer).
I've been digging through the Keystone docs regarding sessions and middleware, but it's not my area of expertise and I can't work out how request tokens are being validated.
How can I validate the token in the authorisation header of a GET
request to my custom endpoint? Appreciate this may relate to express and session management rather than Keystone specifically.