Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
google_application_default_credentials_file.h
1// Copyright 2018 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_APPLICATION_DEFAULT_CREDENTIALS_FILE_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_APPLICATION_DEFAULT_CREDENTIALS_FILE_H
17
18#include "google/cloud/storage/version.h"
19#include <string>
20
21namespace google {
22namespace cloud {
23namespace storage {
24GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
25namespace oauth2 {
26
27/**
28 * Returns the Application Default %Credentials environment variable name.
29 *
30 * This environment variable should be checked for a valid file path when
31 * attempting to load Google Application Default %Credentials.
32 *
33 * @deprecated Prefer using the unified credentials documented in @ref guac
34 */
35char const* GoogleAdcEnvVar();
36
37/**
38 * Returns the path to the Application Default %Credentials file, if set.
39 *
40 * If the Application Default %Credentials environment variable is set, we check
41 * the path specified by its value for a file containing ADCs. Returns an
42 * empty string if no such path exists or the environment variable is not set.
43 *
44 * @deprecated Prefer using the unified credentials documented in @ref guac
45 */
47
48/**
49 * Returns the path to the Application Default %Credentials file, if set.
50 *
51 * If the gcloud utility has configured an Application Default %Credentials
52 * file, the path to that file is returned. Returns an empty string if no such
53 * file exists at the well known path.
54 *
55 * @deprecated Prefer using the unified credentials documented in @ref guac
56 */
58
59/**
60 * Returns the environment variable to override the gcloud ADC path.
61 *
62 * This environment variable is used for testing to override the path that
63 * should be searched for the gcloud Application Default %Credentials file.
64 *
65 * @deprecated Prefer using the unified credentials documented in @ref guac
66 */
67char const* GoogleGcloudAdcFileEnvVar();
68
69/**
70 * Returns the environment variable used to construct the well known ADC path.
71 *
72 * The directory containing a user's application configuration data, indicated
73 * by this environment variable, varies across environments. That directory is
74 * used when constructing the well known path of the Application Default
75 * Credentials file.
76 *
77 * @deprecated Prefer using the unified credentials documented in @ref guac
78 */
79char const* GoogleAdcHomeEnvVar();
80
81} // namespace oauth2
82GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
83} // namespace storage
84} // namespace cloud
85} // namespace google
86
87#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_APPLICATION_DEFAULT_CREDENTIALS_FILE_H
Authentication components for Google Cloud Storage.
Definition: anonymous_credentials.h:26
char const * GoogleGcloudAdcFileEnvVar()
Returns the environment variable to override the gcloud ADC path.
std::string GoogleAdcFilePathFromWellKnownPathOrEmpty()
Returns the path to the Application Default Credentials file, if set.
char const * GoogleAdcEnvVar()
Returns the Application Default Credentials environment variable name.
char const * GoogleAdcHomeEnvVar()
Returns the environment variable used to construct the well known ADC path.
std::string GoogleAdcFilePathFromEnvVarOrEmpty()
Returns the path to the Application Default Credentials file, if set.
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24