Neos\Flow\Security\Context::getAuthenticationTokensOfType PHP Метод

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

Returns all Authentication\Tokens of the security context which are active for the current request and of the given type. If a token has a request pattern that cannot match against the current request it is determined as not active.
public getAuthenticationTokensOfType ( string $className ) : Neos\Flow\Security\Authentication\TokenInterface[]
$className string The class name
Результат Neos\Flow\Security\Authentication\TokenInterface[] Array of set tokens of the specified type
    public function getAuthenticationTokensOfType($className)
    {
        if ($this->initialized === false) {
            $this->initialize();
        }
        $activeTokens = [];
        foreach ($this->activeTokens as $token) {
            if ($token instanceof $className) {
                $activeTokens[] = $token;
            }
        }
        return $activeTokens;
    }