class InDesignAuthenticator extends AbstractGuardAuthenticator

Authenticator used for user authentication from InDesign-Plugin.

Traits

Trait to detect requests from PimPrint InDesign Plugin.

Constants

PARAM_USERNAME

HTTP username param.

PARAM_PASSWORD

HTTP password param.

ERROR_CODE_NO_CREDENTIALS

Exception code 'no credentials'.

Properties

protected BruteforceProtectionHandler $bruteforceProtectionHandler Pimcore BruteforceProtectionHandler instance.

Methods

bool
isInDesignRequest(Request $request)

Returns true if $request comes from PimPrint InDesign-Plugin.

__construct(BruteforceProtectionHandler $bruteforceProtectionHandler, JsonRequestDecoder $jsonRequestDecoder)

InDesignAuthenticator constructor.

bool
supports(Request $request)

{@inheritDoc}

JsonResponse
start(Request $request, AuthenticationException $authException = null)

{@inheritDoc}

array
getCredentials(Request $request)

{@inheritDoc}

UserInterface|null
getUser(array $credentials, UserProviderInterface $userProvider)

{@inheritDoc}

bool
checkCredentials(array $credentials, UserInterface $user)

{@inheritDoc}

JsonResponse
onAuthenticationFailure(Request $request, AuthenticationException $exception)

{@inheritDoc}

null
onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey)

{@inheritDoc}

bool
supportsRememberMe()

{@inheritDoc}

User|null
authenticateSession(Request $request)

Authenticates against PimPrint session.

Details

protected bool isInDesignRequest(Request $request)

Returns true if $request comes from PimPrint InDesign-Plugin.

Parameters

Request $request

Return Value

bool

at line 86
__construct(BruteforceProtectionHandler $bruteforceProtectionHandler, JsonRequestDecoder $jsonRequestDecoder)

InDesignAuthenticator constructor.

Parameters

BruteforceProtectionHandler $bruteforceProtectionHandler
JsonRequestDecoder $jsonRequestDecoder

at line 101
bool supports(Request $request)

{@inheritDoc}

Parameters

Request $request

Return Value

bool

at line 120
JsonResponse start(Request $request, AuthenticationException $authException = null)

{@inheritDoc}

Parameters

Request $request
AuthenticationException $authException

Return Value

JsonResponse

at line 139
array getCredentials(Request $request)

{@inheritDoc}

Parameters

Request $request

Return Value

array

at line 170
UserInterface|null getUser(array $credentials, UserProviderInterface $userProvider)

{@inheritDoc}

Parameters

array $credentials
UserProviderInterface $userProvider

Return Value

UserInterface|null

at line 211
bool checkCredentials(array $credentials, UserInterface $user)

{@inheritDoc}

Parameters

array $credentials
UserInterface $user

Return Value

bool

See also

AdminAuthenticator::checkCredentials

at line 228
JsonResponse onAuthenticationFailure(Request $request, AuthenticationException $exception)

{@inheritDoc}

Parameters

Request $request
AuthenticationException $exception

Return Value

JsonResponse

at line 261
null onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey)

{@inheritDoc}

Parameters

Request $request
TokenInterface $token
string $providerKey

Return Value

null

at line 271
bool supportsRememberMe()

{@inheritDoc}

Return Value

bool

at line 284
User|null authenticateSession(Request $request)

Authenticates against PimPrint session.

Parameters

Request $request

Return Value

User|null

See also

Authentication::authenticateSession