SecurityRuleBuilder

public class SecurityRuleBuilder

The security rule builder is responsible for building a SecurityFilterChain, which consists of a matcher pattern and a list of Spring security filters. The filters are created and configured base upon the security rule’s settings.

Fields

NO_METHODS_REQUIRED_EXCEPTION_MESSAGE

public static final String NO_METHODS_REQUIRED_EXCEPTION_MESSAGE

NO_PATTERN_EXCEPTION_MESSAGE

public static final String NO_PATTERN_EXCEPTION_MESSAGE

NO_PROTOCOL_EXCEPTION_MESSAGE

public static final String NO_PROTOCOL_EXCEPTION_MESSAGE

NO_SUPPORTED_SCHEMES_EXCEPTION_MESSAGE

public static final String NO_SUPPORTED_SCHEMES_EXCEPTION_MESSAGE

Methods

buildSecurityChain

public synchronized SecurityFilterChain buildSecurityChain(MotechURLSecurityRule securityRule, HTTPMethod method)

Builds SecurityFilterChain which is capable of being matched against HttpServletRequest in order to decide whether it applies to that request

Parameters:
  • securityRule – that will be used as pattern
  • method – to be used in filter
Returns:

new filter chain with security rule, matcher and filters

setAuthenticationManager

public void setAuthenticationManager(AuthenticationManager authenticationManager)

setBasicAuthenticationEntryPoint

public void setBasicAuthenticationEntryPoint(AuthenticationEntryPoint basicAuthenticationEntryPoint)

setChannelDecisionManager

public void setChannelDecisionManager(ChannelDecisionManager channelDecisionManager)

setLoginAuthenticationEntryPoint

public void setLoginAuthenticationEntryPoint(AuthenticationEntryPoint loginAuthenticationEntryPoint)

setMotechLogoutHandler

public void setMotechLogoutHandler(MotechLogoutSuccessHandler motechLogoutHandler)

setOpenIDAuthenticationFilter

public void setOpenIDAuthenticationFilter(OpenIDAuthenticationFilter openIDAuthenticationFilter)

setSettingsFacade

public void setSettingsFacade(SettingsFacade settingsFacade)

setUsernamePasswordAuthenticationFilter

public void setUsernamePasswordAuthenticationFilter(UsernamePasswordAuthenticationFilter usernamePasswordAuthenticationFilter)