Class BearerTokenAuthenticationFilter

java.lang.Object
com.codename1.backend.security.BearerTokenAuthenticationFilter
All Implemented Interfaces:
SecurityFilter

public final class BearerTokenAuthenticationFilter extends Object implements SecurityFilter

Authenticates a request from its bearer token.

The token is checked on every request that carries one and nothing is kept: no session is started and the authentication is not stored. A request without a token passes through untouched, for the rules further on to judge. One whose token is refused is answered at once -- 401 with the reason in WWW-Authenticate -- and never reaches the application.