Skip to content

Commit 1753e0d

Browse files
committed
docs: document service_config
1 parent a11f7ee commit 1753e0d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/oauth.rst

+15-2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ These are all the possible fields of a *settings.yaml* file:
7171
redirect_uri: {{str}}
7272
revoke_uri: {{str}}
7373
74+
service_config:
75+
client_user_email: {{str}}
76+
client_json_file_path: {{str}}
77+
client_json_dict: {{dict}}
78+
client_json: {{str}}
79+
7480
save_credentials: {{bool}}
7581
save_credentials_backend: {{str}}
7682
save_credentials_file: {{str}}
@@ -83,15 +89,20 @@ These are all the possible fields of a *settings.yaml* file:
8389
8490
Fields explained:
8591

86-
:client_config_backend (str): From where to read client configuration(API application settings such as client_id and client_secrets) from. Valid values are 'file' and 'settings'. **Default**: 'file'. **Required**: No.
92+
:client_config_backend (str): From where to read client configuration(API application settings such as client_id and client_secrets) from. Valid values are 'file', 'settings' and 'service'. **Default**: 'file'. **Required**: No.
8793
:client_config_file (str): When *client_config_backend* is 'file', path to the file containing client configuration. **Default**: 'client_secrets.json'. **Required**: No.
88-
:client_config (dict): Place holding dictionary for client configuration when *client_config_backend* is 'settings'. **Required**: Yes, only if *client_config_backend* is 'settings'
94+
:client_config (dict): Place holding dictionary for client configuration when *client_config_backend* is 'settings'. **Required**: Yes, only if *client_config_backend* is 'settings' and not using *service_config*
8995
:client_config['client_id'] (str): Client ID of the application. **Required**: Yes, only if *client_config_backend* is 'settings'
9096
:client_config['client_secret'] (str): Client secret of the application. **Required**: Yes, only if *client_config_backend* is 'settings'
9197
:client_config['auth_uri'] (str): The authorization server endpoint URI. **Default**: 'https://accounts.google.com/o/oauth2/auth'. **Required**: No.
9298
:client_config['token_uri'] (str): The token server endpoint URI. **Default**: 'https://accounts.google.com/o/oauth2/token'. **Required**: No.
9399
:client_config['redirect_uri'] (str): Redirection endpoint URI. **Default**: 'urn:ietf:wg:oauth:2.0:oob'. **Required**: No.
94100
:client_config['revoke_uri'] (str): Revoke endpoint URI. **Default**: None. **Required**: No.
101+
:service_config (dict): Place holding dictionary for client configuration when *client_config_backend* is 'service' or 'settings' and using service account. **Required**: Yes, only if *client_config_backend* is 'service' or 'settings' and not using *client_config*
102+
:service_config['client_user_email'] (str): User email that authority was delegated_ to. **Required**: No.
103+
:service_config['client_json_file_path'] (str): Path to service account `.json` key file. **Required**: No.
104+
:service_config['client_json_dict'] (dict): Service account `.json` key file loaded into a dictionary. **Required**: No.
105+
:service_config['client_json'] (str): Service account `.json` key file loaded into a string. **Required**: No.
95106
:save_credentials (bool): True if you want to save credentials. **Default**: False. **Required**: No.
96107
:save_credentials_backend (str): Backend to save credentials to. 'file' and 'dictionary' are the only valid values for now. **Default**: 'file'. **Required**: No.
97108
:save_credentials_file (str): Destination of credentials file. **Required**: Yes, only if *save_credentials_backend* is 'file'.
@@ -100,6 +111,8 @@ Fields explained:
100111
:get_refresh_token (bool): True if you want to retrieve refresh token along with access token. **Default**: False. **Required**: No.
101112
:oauth_scope (list of str): OAuth scope to authenticate. **Default**: ['https://www.googleapis.com/auth/drive']. **Required**: No.
102113

114+
.. _delegated: https://developers.google.com/admin-sdk/directory/v1/guides/delegation
115+
103116
Sample *settings.yaml*
104117
______________________
105118

0 commit comments

Comments
 (0)