serverless-architectures-aws icon indicating copy to clipboard operation
serverless-architectures-aws copied to clipboard

Custom authorizer for /videos

Open johnsgp opened this issue 7 years ago • 0 comments

In Chapter 7, section 7.2.3 on page 179, there is a step to add the custom authorizer to the videos resource in the API Gateway. Later, in section 7.2.5 in Listing 7.5 on page 186, there is JavaScript code for a video controller which makes the HTTP GET request to the API Gateway. I cannot see where this code sets up the Authorization header that is needed by the custom authorizer. When the request is made, I get an HTTP 401 response (Unauthorized). Is there code similar to that in the user controller missing here (configureAuthenticatedRequests -> $ajax.Setup -> beforeSend)?

johnsgp avatar Feb 01 '18 13:02 johnsgp