Documentation
¶
Overview ¶
Package handler is the Lambda entry point: it decodes a Cognito trigger event and routes it to the hook for its trigger source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
PreSignUp Hook[presignup.Event]
PostConfirmation Hook[postconfirmation.Event]
PreAuthentication Hook[preauthentication.Event]
}
Handler holds the enabled hooks. A nil hook is disabled.
func (*Handler) Handle ¶
Handle decodes one event, routes it to its hook, and returns the event the hook responded with.
An event for a disabled hook or an unknown trigger is an error. Cognito triggers are synchronous, so the error reaches the user (a PreSignUp error rejects the sign-up, and a PreAuthentication error the sign-in) and points at the misconfiguration, instead of letting events through unchecked.
Click to show internal directories.
Click to hide internal directories.