Neos\Flow\Security\DummyContext::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)
    {
        $tokens = [];
        foreach ($this->tokens as $token) {
            if ($token instanceof $className) {
                $tokens[] = $token;
            }
        }
        return $tokens;
    }