Snorlax\Auth\Authorization::getCredentials PHP Method

getCredentials() public method

Returns the credentials/token for the Authorization header
public getCredentials ( ) : string
return string
    public function getCredentials();

Usage Example

Example #1
0
 /**
  * @param string $method HTTP method.
  * @param string|\Psr\Http\Message\UriInterface $uri URI object or string.
  * @param array $options Request options to apply.
  *
  * @return ResponseInterface
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function request($method, $uri, $options = [])
 {
     if ($this->authorization !== null) {
         $authHeader = sprintf('%s %s', $this->authorization->getAuthType(), $this->authorization->getCredentials());
         $headers = isset($options['headers']) ? $options['headers'] : [];
         $headers['Authorization'] = $authHeader;
         $options['headers'] = $headers;
     }
     return $this->client->request($method, $uri, $options);
 }
All Usage Examples Of Snorlax\Auth\Authorization::getCredentials