dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.2k stars 793 forks source link

fix: support authorizer with no identity source specified #1639

Closed frozenbonito closed 1 year ago

frozenbonito commented 1 year ago

Description

fix #1638

Motivation and Context

If the authorizer type is REQUEST and its caching is disabled, the identity source is not required. See #1638 for details.

How Has This Been Tested?

I added no-identity-source-authorizer integration test.

dnalborczyk commented 1 year ago

thank you for the PR @frozenbonito !

when I publish your serverless.yml to aws npx serverless deploy and hit the route (with no headers) my response is:

{
  "message": null
}

whereas when I run it locally npx serverless offlin start I get:

{
  "message": "hello"
}

is that expected?

frozenbonito commented 1 year ago

@dnalborczyk Sorry, it seems that package.json was missing.

frozenbonito commented 1 year ago

Fixed.

cruzj6 commented 1 year ago

Will this be merged? Still having this issue