-
Notifications
You must be signed in to change notification settings - Fork 8
Authentication Middleware
goldy4719 edited this page Apr 10, 2026
·
1 revision
Validates incoming requests using JWT claims and attaches the user ID to the Lambda context.
- API Gateway JWT authorizer configured
- JWT must include a sub claim
- Extract authorizer data from the request context.
- Retrieve JWT claims.
- Extract the sub field as the user ID.
- Attach the user ID to the Lambda context.
- Continue request processing.
- Supports multiple API Gateway authorizer formats.
- Fails immediately if authentication data is missing.
- Centralizes user identity handling.