class LoginController extends AbstractAuthenticationController (View source)

A controller which allows for logging into the backend

Traits

A trait to do easy backend module translations

Properties

protected $translator from  ModuleTranslationTrait
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 array<string,class-string> $viewFormatToObjectNameMap
protected array<int,string> $supportedMediaTypes

Methods

string
getModuleLabel(string $id, array $arguments = [])

No description

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.

false
getErrorFlashMessage()

Disable the default error flash message

void
replaceSessionCookie(string $sessionIdentifier)

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

Details

string getModuleLabel(string $id, array $arguments = [])

No description

Parameters

string $id
array $arguments

Return Value

string

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 false getErrorFlashMessage()

Disable the default error flash message

Return Value

false

protected void replaceSessionCookie(string $sessionIdentifier)

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

Parameters

string $sessionIdentifier

Return Value

void