The CredentialsWrapper object provides a wrapper around a FetchAuthTokenInterface.

CloneableInstantiable
Methods
public __construct(Google\Auth\FetchAuthTokenInterface $credentialsFetcher, ?callable $authHttpHandler = NULL)
 

CredentialsWrapper constructor.

public static build(array $args = [])
 

Factory method to create a CredentialsWrapper from an array of options.

public getAuthorizationHeaderCallback()
 
  • return callable Callable function that returns an authorization header.
public getBearerString()
 
  • return string Bearer string containing access token.
public static validate( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
public static validateNotNull( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
Properties
private $authHttpHandler
private $credentialsFetcher
 
  • var FetchAuthTokenInterface $credentialsFetcher
Methods
private static buildApplicationDefaultCredentials(?array $scopes = NULL, ?callable $authHttpHandler = NULL, ?array $authCacheOptions = NULL, ?Psr\Cache\CacheItemPoolInterface $authCache = NULL)
 
private static buildHttpHandlerFactory()
 
private static getToken(Google\Auth\FetchAuthTokenInterface $credentialsFetcher, $authHttpHandler)
private static isExpired( $token)
private static isValid( $token)
private static validateFileExists( $filePath)
private static validateImpl( $arr, $requiredKeys, $allowNull)
Methods
public static build(array $args = [])
 

Factory method to create a CredentialsWrapper from an array of options.

private static buildApplicationDefaultCredentials(?array $scopes = NULL, ?callable $authHttpHandler = NULL, ?array $authCacheOptions = NULL, ?Psr\Cache\CacheItemPoolInterface $authCache = NULL)
 
private static buildHttpHandlerFactory()
 
private static getToken(Google\Auth\FetchAuthTokenInterface $credentialsFetcher, $authHttpHandler)
private static isExpired( $token)
private static isValid( $token)
public static validate( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
private static validateFileExists( $filePath)
private static validateImpl( $arr, $requiredKeys, $allowNull)
public static validateNotNull( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only