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: ['TYPO3.Flow.SomeRole']
Наследование: extends AbstractProvider
 /**
  * @test
  */
 public function canAuthenticateReturnsTrueOnlyForAnTokenThatHasTheCorrectProviderNameSet()
 {
     $mockToken1 = $this->createMock(TokenInterface::class);
     $mockToken1->expects($this->once())->method('getAuthenticationProviderName')->will($this->returnValue('myProvider'));
     $mockToken2 = $this->createMock(TokenInterface::class);
     $mockToken2->expects($this->once())->method('getAuthenticationProviderName')->will($this->returnValue('someOtherProvider'));
     $authenticationProvider = new FileBasedSimpleKeyProvider('myProvider');
     $this->assertTrue($authenticationProvider->canAuthenticate($mockToken1));
     $this->assertFalse($authenticationProvider->canAuthenticate($mockToken2));
 }