class FirewallEntry (View source)

FirewallEntry automatize firewall and access-map configuration with a classic form entry-point.

Properties

protected string $firewallBasePattern
protected string $firewallBasePath
protected string $firewallLogin
protected string $firewallLogout
protected string $firewallLoginCheck
protected string $firewallBaseRole
protected Container $container
protected AuthenticationSuccessHandler $authenticationSuccessHandler
protected AuthenticationFailureHandler $authenticationFailureHandler
protected array $listeners
protected RequestMatcher $requestMatcher
protected boolean $useReferer
protected string $authenticationSuccessHandlerClass
protected string $authenticationFailureHandlerClass
protected AccessDeniedHandlerInterface $accessDeniedHandler
protected boolean $locked

Methods

__construct(Container $container, string $firewallBasePattern, string $firewallBasePath, string|null $firewallLogin = null, string|null $firewallLogout = null, string|null $firewallLoginCheck = null, string|array $firewallBaseRole = 'ROLE_USER', string $authenticationSuccessHandlerClass = AuthenticationSuccessHandler::class, string $authenticationFailureHandlerClass = AuthenticationFailureHandler::class)

FirewallEntry constructor.

$this
withAnonymousAuthenticationListener()

Added anonymous listener to enable all visitor to access your firewall entry base pattern.

$this
withAccessDeniedHandler(string $redirectRoute = '', array $redirectParameters = [])

No description

$this
withSwitchUserListener()

No description

$this
withReferer()

No description

RequestMatcher
getRequestMatcher()

No description

bool
hasAuthenticationEntryPoints()

No description

AbstractAuthenticationListener[]
getListeners()

No description

ListenerInterface
getAuthenticationListener()

No description

AuthenticationEntryPointInterface
getAuthenticationEntryPoint(bool $useForward = false)

No description

ExceptionListener
getExceptionListener(bool $useForward = false)

No description

LogoutListener
getLogoutListener()

No description

Details

__construct(Container $container, string $firewallBasePattern, string $firewallBasePath, string|null $firewallLogin = null, string|null $firewallLogout = null, string|null $firewallLoginCheck = null, string|array $firewallBaseRole = 'ROLE_USER', string $authenticationSuccessHandlerClass = AuthenticationSuccessHandler::class, string $authenticationFailureHandlerClass = AuthenticationFailureHandler::class)

FirewallEntry constructor.

Parameters

Container $container
string $firewallBasePattern
string $firewallBasePath
string|null $firewallLogin
string|null $firewallLogout
string|null $firewallLoginCheck
string|array $firewallBaseRole
string $authenticationSuccessHandlerClass
string $authenticationFailureHandlerClass

$this withAnonymousAuthenticationListener()

Added anonymous listener to enable all visitor to access your firewall entry base pattern.

Warning: this MUST be the before last listener to work.

Return Value

$this

$this withAccessDeniedHandler(string $redirectRoute = '', array $redirectParameters = [])

Parameters

string $redirectRoute
array $redirectParameters

Return Value

$this

$this withSwitchUserListener()

Return Value

$this

$this withReferer()

Return Value

$this

RequestMatcher getRequestMatcher()

Return Value

RequestMatcher

bool hasAuthenticationEntryPoints()

Return Value

bool

AbstractAuthenticationListener[] getListeners()

Return Value

AbstractAuthenticationListener[]

protected ListenerInterface getAuthenticationListener()

Return Value

ListenerInterface

protected AuthenticationEntryPointInterface getAuthenticationEntryPoint(bool $useForward = false)

Parameters

bool $useForward

Return Value

AuthenticationEntryPointInterface

ExceptionListener getExceptionListener(bool $useForward = false)

Parameters

bool $useForward Use true to forward request instead of redirecting. Be careful, Token will be set to null in sub-request!

Return Value

ExceptionListener

protected LogoutListener getLogoutListener()

Return Value

LogoutListener