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

public interface AuthenticationProvider

Known subtypesDaoAuthenticationProvider, JwtAuthenticationProvider

One way of checking an Authentication: a ProviderManager asks each of its providers that supports the token’s class.

Methods

public abstract Authentication authenticate(Authentication authentication)The accepted authentication, or null when this provider cannot decide and the next one should be asked.
public abstract boolean supports(Class<?> authentication)Whether this provider checks tokens of this class.

Method details

authenticate

public abstract Authentication authenticate(Authentication authentication)
The accepted authentication, or null when this provider cannot decide and the next one should be asked.

Throws

AuthenticationException
when the token is refused

supports

public abstract boolean supports(Class<?> authentication)
Whether this provider checks tokens of this class.