@param string|array $authorization
@param string|array $action
@param string $text
@param array $parameters
@param bool $absolute

@return $this
334783
public function actionIfCan($authorization, $action, string $text, array $parameters = [], bool $absolute = true)
    {
        return $this->addIfCan($authorization, Link::toAction($action, $text, $parameters, $absolute));
    }
630126
public function setAuth($auth)
    {
        $auth = strtolower($auth);

        if (!in_array($auth, [self::AUTHENTICATION_METHOD_OAUTH])) {
            throw new \InvalidArgumentException('Parameter "auth" must be filled and valid');
        }

        $this->auth = $auth;
        return $this;
    }
559810
protected function authorize($user, Gate $gate, string $ability, array $args): void
    {
        $can = $gate->forUser($user)->check($ability, $args);

        if (! $can) {
            throw new AuthorizationException(
                "You are not authorized to access {$this->definitionNode->name->value}"
            );
        }
    }
1195390
protected function _addAction(&$text)
    {
        // All: Add the action if left empty
        if (preg_match_all('#<\s*form[^>]+action=""#si', $text, $matches, PREG_SET_ORDER))
        {
            $action = $this->getTemplate()->route();

            foreach ($matches as $match)
            {
                $str = str_replace('action=""', 'action="' . $action . '"', $match[0]);
                $text = str_replace($match[0], $str, $text);
            }
        }

        return $this;
    }
570803
function setAuthorization($username,$password){
		settype($username,"string");
		settype($password,"string");

		$this->_Username = $username;
		$this->_Password = $password;
		$this->_AuthType = "basic";
	}
1251345
public function action($action, $parameters = array(), $absolute = true)
	{
		if ($this->rootNamespace && ! (strpos($action, '\\') === 0))
		{
			$action = $this->rootNamespace.'\\'.$action;
		}
		else
		{
			$action = trim($action, '\\');
		}

		if ( ! is_null($route = $this->routes->getByAction($action)))
		{
			 return $this->toRoute($route, $parameters, $absolute);
		}

		throw new InvalidArgumentException("Action {$action} not defined.");
	}
574727
public function action($action, $parameters = array(), $absolute = true)
    {

        if($path = $this->getPathFinder()->toControllerAction($action, $parameters)){

            if(!$absolute){
                return $path;
            }

            return $this->to($path);
        }

        return parent::action($action, $parameters, $absolute);

    }
424571
public function setAction($action)
        {
            if (null !== $action && !is_string($action)) {
                throw new Exception(
                    'Invalid argument: $action must be a string or null'
                );
            }

            $this->_action    = $action;
            $this->_hrefCache = null;

            return $this;
        }
226654
public function setAuthorizationFlow($name, $flow, $authorizationUrl, $tokenUrl, $refreshUrl = null, array $scopes = null)
    {
        if (!isset($this->authFlows[$name])) {
            $this->authFlows[$name] = [];
        }

        $this->authFlows[$name][] = [$flow, $authorizationUrl, $tokenUrl, $refreshUrl, $scopes];
    }
123448
public function action($text, $controller_action, $parameters = [])
    {
        return $this->addElement('a')->text($text)
            ->href(action($controller_action, $parameters));
    }
575494
public static function with(
            string $authenticationProvider,
            string $authorizationProvider = null
    ): self {
        return new self($authenticationProvider, $authorizationProvider);
    }
326357
function customHTTPAction( $http, $action, $parameters = array() )
    {
        $dataType = $this->dataType();
        if ( $dataType )
            $dataType->customObjectAttributeHTTPAction( $http, $action, $this, $parameters );
    }
450816
public static function make($authorization, $amount, $email, $plan)
    {
        return new static(
            self::generateTransactionRef(),
            $authorization,
            $amount,
            $email,
            $plan
        );
    }
327052
public function checkAccess($action, $access = null, $param = null) {
		return $this->domain->rbac->checkAccess($action, $access, $param);
	}
1049274
protected function setAuthority($authority)
    {
        $aparts = [];
        if (preg_match('/^(([^\@]+)\@)?(.*?)(\:(.+))?$/S', $authority, $aparts)) {
            $this->authority = $authority;

            $this->hash = null;

            if (isset($aparts[2]) && $aparts[2]) {
                $this->userInfo = $aparts[2];
            }
            if (isset($aparts[3]) && $aparts[3]) {
                $this->host = $aparts[3];
            }
            if (isset($aparts[5]) && $aparts[5]) {
                $this->port = (int)$aparts[5];
            }
        } else {
            throw new \DomainException("Hierarchical URL authority part syntax error");
        }

        return $this;
    }
952359
public static void httpComponent(HttpPut request, String auth) {
        auth = auth + "password";
        request.addHeader("Authorization", Base64.encodeBase64String(auth.getBytes(StandardCharsets.UTF_8)));
    }
715782
public function authorize(string $action, EntityContract $entity, Bag $parameters)
    {
        $errors = new Collection();

        $this->callMethods('authorize', [$action, $entity, $parameters], function ($return) use (&$errors) {
            $errors = $errors->merge($return);
        });

        return $errors;
    }