TsgcWSAPIServer_WebAuthn › Events

TsgcWSAPIServer_WebAuthn Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Request pipeline

NameDescription
OnWebAuthnHTTPRequestFires before a WebAuthn endpoint processes an incoming HTTP request; lets the application inspect headers, apply rate limits, or reject the call.
OnWebAuthnHTTPResponseFires after the server has built the HTTP response for a WebAuthn endpoint but before it is sent; useful to audit or decorate the outgoing payload and headers.
OnWebAuthnExceptionFires when an unhandled exception is raised while processing a WebAuthn request; lets the application log the error and override the HTTP response code.
OnWebAuthnUnauthorizedFires when a WebSocket connection attempts to use a WebAuthn-protected resource without a valid token; lets the application decide whether to disconnect.
OnWebAuthnMetadataFires when the server needs authenticator metadata for an AAGUID; lets the application return a cached or custom FIDO MDS BLOB entry.

Registration

NameDescription
OnWebAuthnRegistrationOptionsRequestFires at the start of /register/begin when a client asks for PublicKeyCredentialCreationOptions; lets the application validate the user and approve or reject the ceremony.
OnWebAuthnRegistrationOptionsResponseFires after the server has built the PublicKeyCredentialCreationOptions response for /register/begin; lets the application inspect or persist the generated challenge.
OnWebAuthnRegistrationValidateCredentialIdFires during /register/verify to let the application check that the new credential id is unique in its user store.
OnWebAuthnRegistrationValidateCertificateFires during /register/verify to let the application validate the attestation certificate chain (for example against a cached FIDO MDS) and override the built-in check.
OnWebAuthnRegistrationSuccessfulFires at the end of /register/verify when attestation has been accepted; this is where the application must persist the new credential record for the user.
OnWebAuthnRegistrationErrorFires when /register/verify rejects the attestation; exposes the failing request and the textual reason so the application can log or alert on it.

Authentication

NameDescription
OnWebAuthnAuthenticationOptionsRequestFires at the start of /authenticate/begin; the application must return the list of credentials registered for the user so the server can build PublicKeyCredentialRequestOptions.
OnWebAuthnAuthenticationOptionsResponseFires after the server has built the PublicKeyCredentialRequestOptions response for /authenticate/begin; lets the application inspect or persist the generated challenge.
OnWebAuthnAuthenticationSuccessfulFires at the end of /authenticate/verify when the assertion signature is valid; the application should update the sign counter and establish the session.
OnWebAuthnAuthenticationErrorFires when /authenticate/verify rejects the assertion; exposes the failing request and the textual reason so the application can log or alert on it.

All Events (alphabetical)

NameDescription
OnWebAuthnAuthenticationErrorFires when /authenticate/verify rejects the assertion; exposes the failing request and the textual reason so the application can log or alert on it.
OnWebAuthnAuthenticationOptionsRequestFires at the start of /authenticate/begin; the application must return the list of credentials registered for the user so the server can build PublicKeyCredentialRequestOptions.
OnWebAuthnAuthenticationOptionsResponseFires after the server has built the PublicKeyCredentialRequestOptions response for /authenticate/begin; lets the application inspect or persist the generated challenge.
OnWebAuthnAuthenticationSuccessfulFires at the end of /authenticate/verify when the assertion signature is valid; the application should update the sign counter and establish the session.
OnWebAuthnExceptionFires when an unhandled exception is raised while processing a WebAuthn request; lets the application log the error and override the HTTP response code.
OnWebAuthnHTTPRequestFires before a WebAuthn endpoint processes an incoming HTTP request; lets the application inspect headers, apply rate limits, or reject the call.
OnWebAuthnHTTPResponseFires after the server has built the HTTP response for a WebAuthn endpoint but before it is sent; useful to audit or decorate the outgoing payload and headers.
OnWebAuthnMetadataFires when the server needs authenticator metadata for an AAGUID; lets the application return a cached or custom FIDO MDS BLOB entry.
OnWebAuthnRegistrationErrorFires when /register/verify rejects the attestation; exposes the failing request and the textual reason so the application can log or alert on it.
OnWebAuthnRegistrationOptionsRequestFires at the start of /register/begin when a client asks for PublicKeyCredentialCreationOptions; lets the application validate the user and approve or reject the ceremony.
OnWebAuthnRegistrationOptionsResponseFires after the server has built the PublicKeyCredentialCreationOptions response for /register/begin; lets the application inspect or persist the generated challenge.
OnWebAuthnRegistrationSuccessfulFires at the end of /register/verify when attestation has been accepted; this is where the application must persist the new credential record for the user.
OnWebAuthnRegistrationValidateCertificateFires during /register/verify to let the application validate the attestation certificate chain (for example against a cached FIDO MDS) and override the built-in check.
OnWebAuthnRegistrationValidateCredentialIdFires during /register/verify to let the application check that the new credential id is unique in its user store.
OnWebAuthnUnauthorizedFires when a WebSocket connection attempts to use a WebAuthn-protected resource without a valid token; lets the application decide whether to disconnect.