Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class WebAuthnAuthenticationFilter

  1. Object
  2. WebAuthnAuthenticationFilter

ImplementsSecurityFilter

Signs a user in with a passkey: hands out the options of a sign-in at POST /webauthn/authenticate/options, and takes the authenticator’s answer at POST /login/webauthn.

The options are kept in the session they were asked from, for five minutes unless set otherwise, and are taken out of it before the answer is looked at: a challenge is answered once, in the session it was given to, in time, or not at all.

Fields

public static final String PENDING = "CN1_WEBAUTHN_AUTHENTICATION"The session attribute a sign-in’s options wait under.

Methods

public HttpServer.Response doFilter(HttpServer.Request request, FilterChain chain) throws ExceptionThe answer to request; null when nothing under the chain routes it, which the server answers 404.

Inherited methods

Field details

PENDING

public static final String PENDING = "CN1_WEBAUTHN_AUTHENTICATION"
The session attribute a sign-in’s options wait under.

Method details

doFilter

public HttpServer.Response doFilter(HttpServer.Request request, FilterChain chain) throws Exception
The answer to request; null when nothing under the chain routes it, which the server answers 404.

Throws

Exception