class LoginController extends AbstractAuthenticationController (View source)

A controller which allows for logging into the backend

Properties

protected string $defaultViewObjectName
protected SessionInterface $session
protected SessionManagerInterface $sessionManager
protected BackendRedirectionService $backendRedirectionService
protected DomainRepository $domainRepository
protected SiteRepository $siteRepository
protected StringFrontend $loginTokenCache
protected string $sessionName
protected FlashMessageService $flashMessageService
protected Translator $translator
protected array $viewFormatToObjectNameMap
protected array $supportedMediaTypes

Methods

void
initializeIndexAction()

No description

void
indexAction(string|null $username = null, bool $unauthorized = false)

Default action, displays the login screen

void
tokenLoginAction(string $token)

Logs a user in if a session identifier is available under the given token in the token cache.

void
onAuthenticationFailure(AuthenticationRequiredException $exception = null)

Is called if authentication failed.

void
onAuthenticationSuccess(ActionRequest $originalRequest = null)

Is called if authentication was successful.

void
logoutAction()

Logs out a - possibly - currently logged in account.

bool
getErrorFlashMessage()

Disable the default error flash message

void
replaceSessionCookie(string $sessionIdentifier)

Sets the session cookie to the given identifier, overriding an existing cookie.

Details

void initializeIndexAction()

No description

Return Value

void

void indexAction(string|null $username = null, bool $unauthorized = false)

Default action, displays the login screen

Parameters

string|null $username

Optional: A username to pre-fill into the username field

bool $unauthorized

Return Value

void

Exceptions

InvalidFlashMessageConfigurationException
InvalidRequestPatternException
NoRequestPatternFoundException
StopActionException
Exception

void tokenLoginAction(string $token)

Logs a user in if a session identifier is available under the given token in the token cache.

Parameters

string $token

Return Value

void

Exceptions

StopActionException
SessionNotStartedException

protected void onAuthenticationFailure(AuthenticationRequiredException $exception = null)

Is called if authentication failed.

Parameters

AuthenticationRequiredException $exception

The exception thrown while the authentication process

Return Value

void

protected void onAuthenticationSuccess(ActionRequest $originalRequest = null)

Is called if authentication was successful.

Parameters

ActionRequest $originalRequest

The request that was intercepted by the security framework, NULL if there was none

Return Value

void

Exceptions

SessionNotStartedException
StopActionException
NoSuchArgumentException

void logoutAction()

Logs out a - possibly - currently logged in account.

The possible redirection URI is queried from the redirection service at first, before the actual logout takes place, and the session gets destroyed.

Return Value

void

protected bool getErrorFlashMessage()

Disable the default error flash message

Return Value

bool

protected void replaceSessionCookie(string $sessionIdentifier)

Sets the session cookie to the given identifier, overriding an existing cookie.

Parameters

string $sessionIdentifier

Return Value

void