AppserverIo\Appserver\ServletEngine\Security\Auth\Spi\DatabasePDOLoginModule::initialize PHP Метод

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

The following parameters can by default be passed from the configuration. lookupName: The datasource name used to lookup in the naming directory rolesQuery: The database query used to load the user's roles principalsQuery: The database query used to load the user
public initialize ( AppserverIo\Psr\Security\Auth\Subject $subject, AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface $callbackHandler, AppserverIo\Collections\MapInterface $sharedState, AppserverIo\Collections\MapInterface $params ) : void
$subject AppserverIo\Psr\Security\Auth\Subject The Subject to update after a successful login
$callbackHandler AppserverIo\Psr\Security\Auth\Callback\CallbackHandlerInterface The callback handler that will be used to obtain the user identity and credentials
$sharedState AppserverIo\Collections\MapInterface A map shared between all configured login module instances
$params AppserverIo\Collections\MapInterface The parameters passed to the login module
Результат void
    public function initialize(Subject $subject, CallbackHandlerInterface $callbackHandler, MapInterface $sharedState, MapInterface $params)
    {
        // call the parent method
        parent::initialize($subject, $callbackHandler, $sharedState, $params);
        // load the parameters from the map
        $this->lookupName = new String($params->get(ParamKeys::LOOKUP_NAME));
        $this->rolesQuery = new String($params->get(ParamKeys::ROLES_QUERY));
        $this->principalsQuery = new String($params->get(ParamKeys::PRINCIPALS_QUERY));
    }