Authorize.

@param CardPayments\Authorization $auth
@return CardPayments\Authorization
@throws PaysafeException
333813
public function authorize(CardPayments\Authorization $auth)
    {
        $auth->setRequiredFields(array(
             'merchantRefNum',
             'amount',
             'card'
        ));
        $auth->setOptionalFields(array(
             'settleWithAuth',
	     'profile',	
             'customerIp',
             'dupCheck',
             'description',
             'authentication',
             'billingDetails',
             'shippingDetails',
             'recurring',
             'merchantDescriptor',
             'accordD',
             'description',
             'splitpay',
	     'storedCredential'
        ));

        $request = new Request(array(
             'method' => Request::POST,
             'uri' => $this->prepareURI("/auths"),
             'body' => $auth
        ));
        $response = $this->client->processRequest($request);

        return new CardPayments\Authorization($response);
    }
757414
private function _authorizePaymentAmount ($authorizationAmount, $authorizationReferenceId)
    {
        $response = $this->callStepAndCheckForException('authorizePaymentAmount', 
                array(
                    $authorizationAmount,
                    $authorizationReferenceId
                ));
        
        $this->printResponseToWebpage("printAuthorizeOnBillingAgreementResponse", array(
            $response
        ));
        
        return getAmazonAuthorizationIdFromAuthorizeOnBillingAgreementResponse($response);
    }
1073538
public function charge($amount = null)
    {
        return (new AuthorizationBuilder(TransactionType::SALE, $this))
                        ->withAmount($amount)
                        ->withOneTimePayment(true);
    }
964568
protected function getClient(array $auth)
    {
        $endpoint = sprintf('DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s', $auth['account-name'], $auth['api-key']);

        return ServicesBuilder::getInstance()->createBlobService($endpoint);
    }
648271
public function authorize($ability, $arguments = array())
    {
        list($ability, $arguments) = $this->parseAbilityAndArguments($ability, $arguments);

        $gate = App::make('Nova\Auth\Access\GateInterface');

        return $this->authorizeAtGate($gate, $ability, $arguments);
    }
1176743
public function authorize(AuthenticationInterface $authentication)
    {
        $this->setHeader();

        $this->fetchToken();

        $this->checkTokenType();

        $authentication->addAttribute($this->token->access_token);
    }
1275289
public function getAuthReversal(CardPayments\AuthorizationReversal $authReversal)
    {
        $authReversal->setRequiredFields(array('id'));
        $authReversal->checkRequiredFields();

        $request = new Request(array(
             'method' => Request::GET,
             'uri' => $this->prepareURI("/voidauths/" . $authReversal->id)
        ));

        $response = $this->client->processRequest($request);
        return new CardPayments\AuthorizationReversal($response);
    }
329074
private function payload(array $auth, array $params)
    {
        $payload = array_merge($auth, $params);
        $payload = array_change_key_case($payload, CASE_LOWER);

        ksort($payload);

        return $payload;
    }
636171
public function authorize()
    {
        $response = $this->send(self::API_TOKEN_URL, false, array_only($this->config, [
            'client_id', 'client_secret', 'redirect_uri', 'username', 'password', 'grant_type'
        ]), 'POST');

        if ($token = array_get($response, 'access_token')) {
            $this->setAccessToken($token);
        }

        return $this;
    }
492646
public function setAuthToken($token)
    {
        $this->apiClient
            ->setShopId(null)
            ->setShopPassword(null)
            ->setBearerToken($token);

        return $this;
    }
591115
public function authorizedAs(string $user, string $password): self
    {
        $this->headers->putAuthorization($user, $password);
        return $this;
    }
824053
public function ApiRequestAuthenticate($tokenAuth)
    {
        $this->beforeLoginCheckBruteForce();

        /** @var \Piwik\Auth $auth */
        $auth = StaticContainer::get('Piwik\Auth');
        $auth->setLogin($login = null);
        $auth->setTokenAuth($tokenAuth);
    }
896213
public function auth($user, $pass)
	{
		$this->user = $user;
		$this->pass = $pass;

		return $this;
	}
243108
public function additionalAuth($amount = null)
    {
        return (new AuthorizationBuilder(TransactionType::AUTH))
            ->withPaymentMethod($this->transactionReference)
            ->withAmount($amount);
    }
639165
public function reverseAuth(CardPayments\AuthorizationReversal $authReversal)
    {
        $authReversal->setRequiredFields(array('authorizationID'));
        $authReversal->checkRequiredFields();
        $authReversal->setRequiredFields(array('merchantRefNum'));
        $authReversal->setOptionalFields(array(
             'amount',
             'dupCheck'
        ));

        $request = new Request(array(
             'method' => Request::POST,
             'uri' => $this->prepareURI("/auths/" . $authReversal->authorizationID . "/voidauths"),
             'body' => $authReversal
        ));
        $response = $this->client->processRequest($request);

        return new CardPayments\AuthorizationReversal($response);
    }
122701
public function checkAuthorization($authorization, $client_id, $access_token) {
        $instance = new checkAuthorization($this, $this->getUserAgent(), $authorization, $client_id, $access_token);
        return $instance;
    }
640192
protected function getRoleFromAuth(AuraAuth $auth)
    {
        if (! $auth->isValid()) {
            return $this->guestRole;
        }

        $data = $auth->getUserData();

        return isset($data[$this->roleKey])
            ? $data[$this->roleKey]
            : $this->memberRole;
    }