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

public final class BasicAuthenticationFilter

  1. Object
  2. BasicAuthenticationFilter

ImplementsSecurityFilter

Authenticates a request from its Authorization: Basic header.

The credentials are checked on every request that carries them and nothing is kept: no session is started. A request without the header passes through untouched, for the rules further on to judge; one whose credentials are refused is answered 401 with a challenge.

On a chain with a second factor, the right password of a user who has one is refused too, with a 401 that says why: see HttpBasicConfigurer.secondFactorExempt.

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