class PersistedUsernamePasswordProvider extends AbstractProvider (View source)

An authentication provider that authenticates Neos\Flow\Security\Authentication\Token\UsernamePassword tokens.

The accounts are stored in the Content Repository.

Properties

protected string $name from  AbstractProvider
protected array $options from  AbstractProvider
protected AccountRepository $accountRepository
protected HashService $hashService
protected Context $securityContext
protected PersistenceManagerInterface $persistenceManager
protected PrecomposedHashProvider $precomposedHashProvider

The PrecomposedHashProvider has to be injected non-lazy to prevent timing differences

Methods

create(string $name, array $options)

Factory method

__construct(string $name, array $options = [])

Protected constructor, see create method

bool
canAuthenticate(TokenInterface $authenticationToken)

Returns true if the given token can be authenticated by this provider

array
getTokenClassNames()

Returns the class names of the tokens this provider can authenticate.

void
authenticate(TokenInterface $authenticationToken)

Checks the given token for validity and sets the token authentication status accordingly (success, wrong credentials or no credentials given).

Details

static AuthenticationProviderInterface create(string $name, array $options)

Factory method

Parameters

string $name
array $options

Return Value

AuthenticationProviderInterface

protected __construct(string $name, array $options = [])

Protected constructor, see create method

Parameters

string $name

The name of this authentication provider

array $options

Additional configuration options

See also

create

bool canAuthenticate(TokenInterface $authenticationToken)

Returns true if the given token can be authenticated by this provider

Parameters

TokenInterface $authenticationToken

The token that should be authenticated

Return Value

bool

true if the given token class can be authenticated by this provider

array getTokenClassNames()

Returns the class names of the tokens this provider can authenticate.

Return Value

array

The classname of the token this provider is responsible for

void authenticate(TokenInterface $authenticationToken)

Checks the given token for validity and sets the token authentication status accordingly (success, wrong credentials or no credentials given).

Parameters

TokenInterface $authenticationToken

The token to be authenticated

Return Value

void

Exceptions

UnsupportedAuthenticationTokenException
IllegalObjectTypeException
InvalidAuthenticationStatusException