BetaOptionalreq: IncomingMessageCan be passed to force which request to act on. Optional.
Optionalres: OutgoingMessage<IncomingMessage>Can be passed to force which response to act on. Optional.
Indicates if the action was successful.
This method is in beta and could change in the future
BetaChecks if the passed user should be blocked according to AppSec rules. If no user is linked to the current trace, will link the passed user to it.
Properties of the authenticated user. Accepts custom fields.
Indicates whether the user should be blocked.
This method is in beta and could change in the future
BetaLinks an authenticated user to the current trace.
Properties of the authenticated user. Accepts custom fields.
This method is in beta and could change in the future
BetaLinks a custom event to the current trace.
The name of the event.
Optionalmetadata: { [key: string]: string }Custom fields to link to the event.
This method is in beta and could change in future versions.
BetaLinks a failed login event to the current trace.
The user id of the attempted login.
If the user id exists.
Optionalmetadata: { [key: string]: string }Custom fields to link to the login failure event.
This method is in beta and could change in future versions.
BetaLinks a successful login event to the current trace. Will link the passed user to the current trace with Appsec.setUser() internally.
Properties of the authenticated user. Accepts custom fields.
Optionalmetadata: { [key: string]: string }Custom fields to link to the login success event.
This method is in beta and could change in future versions.
Sends a "blocked" template response based on the request accept header and ends the response. You should stop processing the request after calling this function!