framework/filters/auth/AuthMethod.php
protected function isOptional($action)
    {
        $id = $this->getActionId($action);
        foreach ($this->optional as $pattern) {
            if (StringHelper::matchWildcard($pattern, $id)) {
                return true;
            }
        }

        return false;
    }
protected function isOptional($action)
    {
        $id = $this->getActionId($action);
        foreach ($this->optional as $pattern) {
            if (StringHelper::matchWildcard($pattern, $id)) {
                return true;
            }
        }

        return false;
    }
Checks, whether authentication is optional for the given action.

@param Action $action action to be checked.
@return bool whether authentication is optional or not.
@see optional
@since 2.0.7