class FileBasedSimpleKeyProvider extends AbstractProvider (View source)

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

The passwords are stored as encrypted files in persisted data and are fetched using the file based simple key service.

The roles set in authenticateRoles will be added to the authenticated token, but will not be persisted in the database as this provider is used for situations in which no database connection might be present.

= Example =

Neos: Flow: security: authentication: providers: AdminInterfaceProvider: provider: FileBasedSimpleKeyProvider providerOptions: keyName: AdminKey authenticateRoles: ['Neos.Flow.SomeRole']

Properties

protected string $name from  AbstractProvider
protected array $options from  AbstractProvider
protected HashService $hashService
protected FileBasedSimpleKeyService $fileBasedSimpleKeyService
protected PolicyService $policyService

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)

Sets isAuthenticated to true for all tokens.

void
validateCredentials(PasswordTokenInterface $authenticationToken)

No description

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)

Sets isAuthenticated to true for all tokens.

Parameters

TokenInterface $authenticationToken

The token to be authenticated

Return Value

void

Exceptions

UnsupportedAuthenticationTokenException
Exception
InvalidAuthenticationStatusException

protected void validateCredentials(PasswordTokenInterface $authenticationToken)

No description

Parameters

PasswordTokenInterface $authenticationToken

Return Value

void

Exceptions

Exception