Beta
Optional
req: IncomingMessageCan be passed to force which request to act on. Optional.
Optional
res: 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
Beta
Checks 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
Beta
Links 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
Beta
Links a custom event to the current trace.
The name of the event.
Optional
metadata: { Custom fields to link to the event.
This method is in beta and could change in future versions.
Beta
Links a failed login event to the current trace.
The user id of the attemped login.
If the user id exists.
Optional
metadata: { Custom fields to link to the login failure event.
This method is in beta and could change in future versions.
Beta
Links 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.
Optional
metadata: { 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!