Skip to content

APIGatewayProxyRequestEvent does not have authorizer #33

Closed
@oharaandrew314

Description

@oharaandrew314

The APIGatewayProxyRequestEvent requestContext object does not have the authorizer object. With the new addition of the authorizer context, I am unsure how to structure a new Authorizer object.

It is entirely possible to have an authorizer json blob like:

{
    "principalId": "123", // Required by authorizer
    "roles": "role1,role2",  // Additional arbitrary parameter from authorizer context
    "likes_pie": true // Additional arbitrary parameter from authorizer context
}

The principalId is always part of the authorizer blob, and thus should be a String field on a new Authorizer object. However, the additional arbitrary parameters provided by the authorizer context should be a map. This won't (de)serialize 1:1 between JSON and Java however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions