CredentialsLoader contains the behaviour used to locate and find default credentials files on the file system.
| Constants |
| public Google |
| public Google |
| public Google |
| public Google |
| public Google |
| public Google |
| public Google |
| Methods |
| public static fromEnv() Load a JSON key from the path specified in the environment. Load a JSON key from the path specified in the environment variable GOOGLE_APPLICATION_CREDENTIALS. Return null if GOOGLE_APPLICATION_CREDENTIALS is not specified.
|
| public static fromWellKnownFile() Load a JSON key from a well known path. The well known path is OS dependent:
If the file does not exist, this returns null.
|
| public static getDefaultClientCertSource() Gets a callable which returns the default device certification.
|
| public getUniverseDomain() : string Get the universe domain from the credential. Defaults to "googleapis.com" for all credential types which do not support universe domain.
|
| public getUpdateMetadataFunc() export a callback function which updates runtime metadata.
|
| public static makeCredentials( $scope, array $jsonKey, $defaultScope = NULL) Create a new Credentials instance.
|
| public static makeHttpClient(Google Create an authorized HTTP Client from an instance of FetchAuthTokenInterface.
|
| public static makeInsecureCredentials() Create a new instance of InsecureCredentials.
|
| public static quotaProjectFromEnv() Fetch a quota project from the environment variable GOOGLE_CLOUD_QUOTA_PROJECT. Return null if GOOGLE_CLOUD_QUOTA_PROJECT is not specified.
|
| public static shouldLoadClientCertSource() Determines whether or not the default device certificate should be loaded.
|
| public updateMetadata( $metadata, $authUri = NULL, ?callable $httpHandler = NULL) Updates metadata with the authorization token.
|
| Properties |
protected static $metricMetadataKey = 'x-goog-api-client'
|
| Methods |
protected applyServiceApiUsageMetrics( $metadata)
|
protected applyTokenEndpointMetrics( $metadata, $authRequestType)
|
| protected getCredType() : string |
protected static getMetricsHeader( $credType = '', $authRequestType = '') : string
|
| protected static getVersion() : string |
| Properties |
private static $version = NULL
|
| Methods |
| private static getEnv(string $env) : ?mixed |
private static isOnWindows()
|
private static loadDefaultClientCertSourceFile()
|
private static unableToReadEnv( $cause)
|
| Properties |
protected static $metricMetadataKey = 'x-goog-api-client'
|
private static $version = NULL
|
| Methods |
| public static fromEnv() Load a JSON key from the path specified in the environment. Load a JSON key from the path specified in the environment variable GOOGLE_APPLICATION_CREDENTIALS. Return null if GOOGLE_APPLICATION_CREDENTIALS is not specified.
|
| public static fromWellKnownFile() Load a JSON key from a well known path. The well known path is OS dependent:
If the file does not exist, this returns null.
|
| public static getDefaultClientCertSource() Gets a callable which returns the default device certification.
|
| private static getEnv(string $env) : ?mixed |
protected static getMetricsHeader( $credType = '', $authRequestType = '') : string
|
| protected static getVersion() : string |
private static isOnWindows()
|
private static loadDefaultClientCertSourceFile()
|
| public static makeCredentials( $scope, array $jsonKey, $defaultScope = NULL) Create a new Credentials instance.
|
| public static makeHttpClient(Google Create an authorized HTTP Client from an instance of FetchAuthTokenInterface.
|
| public static makeInsecureCredentials() Create a new instance of InsecureCredentials.
|
| public static quotaProjectFromEnv() Fetch a quota project from the environment variable GOOGLE_CLOUD_QUOTA_PROJECT. Return null if GOOGLE_CLOUD_QUOTA_PROJECT is not specified.
|
| public static shouldLoadClientCertSource() Determines whether or not the default device certificate should be loaded.
|
private static unableToReadEnv( $cause)
|