RedirectHandler

Resolve felogin related redirects based on the current login type and the selected configuration (redirect mode)

Internal

this is a concrete TYPO3 implementation and solely used for EXT:felogin and not part of TYPO3's Core API.

Table of Contents

Properties

$redirectModeHandler  : RedirectModeHandler
$redirectUrlValidator  : RedirectUrlValidator
$userIsLoggedIn  : bool

Methods

__construct()  : mixed
getLoginFormRedirectUrl()  : string
Returns the redirect Url that should be used in login form template for GET/POST redirect mode
getLogoutFormRedirectUrl()  : string
Returns the redirect Url that should be used in logout form
getReferrerForLoginForm()  : string
Determines the `referer` variable used in the login form for loginMode=referer depending on the following evaluation order:
processRedirect()  : string
Process redirect modes. This method searches for a redirect url using all configured modes and returns it.
fetchReturnUrlFromList()  : string
Base on setting redirectFirstMethod get first or last entry from redirect url list.
getGetpostRedirectUrl()  : string
Is used for alternative redirect urls on redirect mode "getpost"
getLogoutRedirectUrl()  : string
Get alternative logout form redirect url if logout and page not accessible
handleSuccessfulLogin()  : string
Generate redirect_url for case that the user was successfully logged in
handleSuccessfulLogout()  : string
Handle redirect mode logout
isRedirectModeActive()  : bool
isReferrerRedirectEnabled()  : bool
Returns whether redirect based on the referrer is enabled
isUserLoginFailedAndLoginErrorActive()  : bool

Properties

$userIsLoggedIn

protected bool $userIsLoggedIn = false

Methods

getReferrerForLoginForm()

Determines the `referer` variable used in the login form for loginMode=referer depending on the following evaluation order:

public getReferrerForLoginForm(RequestInterface $request, array<string|int, mixed> $settings) : string
  • HTTP POST parameter referer
  • HTTP GET parameter referer
  • HTTP_REFERER
  • URL of initiating request in case plugin has been called via sub-request

The evaluated referer is only returned, if it is considered valid.

Parameters
$request : RequestInterface
$settings : array<string|int, mixed>
Return values
string

processRedirect()

Process redirect modes. This method searches for a redirect url using all configured modes and returns it.

public processRedirect(RequestInterface $request, string $loginType, RedirectConfiguration $configuration, string $redirectModeReferrer) : string
Parameters
$request : RequestInterface
$loginType : string
$configuration : RedirectConfiguration
$redirectModeReferrer : string
Return values
string

fetchReturnUrlFromList()

Base on setting redirectFirstMethod get first or last entry from redirect url list.

protected fetchReturnUrlFromList(array<string|int, mixed> $redirectUrlList, string $redirectFirstMethod) : string
Parameters
$redirectUrlList : array<string|int, mixed>
$redirectFirstMethod : string
Return values
string

getGetpostRedirectUrl()

Is used for alternative redirect urls on redirect mode "getpost"

protected getGetpostRedirectUrl(RequestInterface $request, array<string|int, mixed> $redirectModes) : string
Parameters
$request : RequestInterface
$redirectModes : array<string|int, mixed>
Return values
string

getLogoutRedirectUrl()

Get alternative logout form redirect url if logout and page not accessible

protected getLogoutRedirectUrl(RequestInterface $request, array<string|int, mixed> $redirectModes[, int $redirectPageLogout = 0 ]) : string
Parameters
$request : RequestInterface
$redirectModes : array<string|int, mixed>
$redirectPageLogout : int = 0
Return values
string

handleSuccessfulLogin()

Generate redirect_url for case that the user was successfully logged in

protected handleSuccessfulLogin(RequestInterface $request, string $redirectMode[, int $redirectPageLogin = 0 ][, string $domains = '' ][, string $redirectModeReferrer = '' ]) : string
Parameters
$request : RequestInterface
$redirectMode : string
$redirectPageLogin : int = 0
$domains : string = ''
$redirectModeReferrer : string = ''
Return values
string

handleSuccessfulLogout()

Handle redirect mode logout

protected handleSuccessfulLogout(RequestInterface $request, string $redirectMode, int $redirectPageLogout) : string
Parameters
$request : RequestInterface
$redirectMode : string
$redirectPageLogout : int
Return values
string

isRedirectModeActive()

protected isRedirectModeActive(array<string|int, mixed> $redirectModes, string $mode) : bool
Parameters
$redirectModes : array<string|int, mixed>
$mode : string
Return values
bool

isReferrerRedirectEnabled()

Returns whether redirect based on the referrer is enabled

protected isReferrerRedirectEnabled(array<string|int, mixed> $settings) : bool
Parameters
$settings : array<string|int, mixed>
Return values
bool

isUserLoginFailedAndLoginErrorActive()

protected isUserLoginFailedAndLoginErrorActive(array<string|int, mixed> $redirectModes, string $loginType) : bool
Parameters
$redirectModes : array<string|int, mixed>
$loginType : string
Return values
bool

        
On this page

Search results