MotechRestBasicAuthenticationEntryPoint

public class MotechRestBasicAuthenticationEntryPoint extends BasicAuthenticationEntryPoint

A custom entry point that is invoked when there is an authentication exception within the filter. This ensures that when a user does not have login privileges and are unable to authenticate, a 401 unauthorized response is returned.

Fields

SECURITY_REALM_KEY

public static final String SECURITY_REALM_KEY

Constructors

MotechRestBasicAuthenticationEntryPoint

public MotechRestBasicAuthenticationEntryPoint(SettingsFacade settingsFacade)

Methods

commence

public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)