Snorlax\Auth\Authorization::getAuthType PHP Method

getAuthType() public method

Returns the authorization type, such as "Bearer" or "Basic"
public getAuthType ( )
    public function getAuthType();

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::getAuthType