AppserverIo\Appserver\ServletEngine\Security\StandardAuthenticationManager::injectAuthenticators PHP Метод

injectAuthenticators() публичный Метод

Inject the storage for the authenticators.
public injectAuthenticators ( AppserverIo\Storage\StorageInterface $authenticators ) : void
$authenticators AppserverIo\Storage\StorageInterface The storage instance
Результат void
    public function injectAuthenticators(StorageInterface $authenticators)
    {
        $this->authenticators = $authenticators;
    }

Usage Example

 /**
  * The main method that creates new instances in a separate context.
  *
  * @param \AppserverIo\Psr\Application\ApplicationInterface         $application          The application instance to register the class loader with
  * @param \AppserverIo\Appserver\Core\Api\Node\ManagerNodeInterface $managerConfiguration The manager configuration
  *
  * @return void
  */
 public static function visit(ApplicationInterface $application, ManagerNodeInterface $managerConfiguration)
 {
     // initialize the storage instances
     $authenticators = new StackableStorage();
     $mappings = new StackableStorage();
     // initialize the authentication manager
     $authenticationManager = new StandardAuthenticationManager();
     $authenticationManager->injectMappings($mappings);
     $authenticationManager->injectApplication($application);
     $authenticationManager->injectAuthenticators($authenticators);
     $authenticationManager->injectManagerConfiguration($managerConfiguration);
     // attach the instance
     $application->addManager($authenticationManager, $managerConfiguration);
 }