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

public final class RememberMeAuthenticationFilter

  1. Object
  2. RememberMeAuthenticationFilter

ImplementsSecurityFilter

Recognizes a returning user by their remember-me cookie, on a request nobody has signed in for.

A request that already has an authentication – from its session, or from a credential it carried – is left alone. Otherwise the chain’s RememberMeServices are asked; when they recognize the user, the authentication becomes the request’s and is saved, so the session that starts here carries it and the cookie is not consulted again until that session ends.

On a chain with a SecondFactorPolicy, a user the policy requires a second factor of is recognized only by a cookie issued after one. Any other cookie of theirs is withdrawn and the request stays anonymous: a cookie is not a way around the code.

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

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