changed extension of example config file and updated all references accordingly
This commit is contained in:
10
duo_api.py
10
duo_api.py
@@ -33,9 +33,9 @@
|
||||
method to get you started.
|
||||
|
||||
To run the config-file implementation of the client, simply create a config
|
||||
file (duo_api.conf) from the template (duo_api.tmpl) and configure it for
|
||||
your environment in the same directory as this script and run it. To use it
|
||||
without config file, comment out the code below and provide your values.
|
||||
file (duo_api.conf) from the example (duo_api.conf.dist) and configure it
|
||||
for your environment in the same directory as this script and run it. To use
|
||||
it without config file, comment out the code below and provide your values.
|
||||
|
||||
See https://duo.com/docs/authapi and https://duo.com/docs/adminapi for the
|
||||
available endpoints, parameters and responses.
|
||||
@@ -96,7 +96,7 @@ def duo_api_config(config, req, vars=None):
|
||||
Returns: the API response (JSON Object)
|
||||
|
||||
To pass parameters with the request, provide a dict (section) with a key
|
||||
equal to req. Below sample ConfigParser config file for an auth request:
|
||||
equal to req. Below a ConfigParser config file for an auth request:
|
||||
|
||||
[API]
|
||||
host=api-XXXXXXXX.duosecurity.com
|
||||
@@ -154,7 +154,7 @@ if __name__ == '__main__':
|
||||
# print('Access', response['result'])
|
||||
|
||||
# Same example as above, now using a config file, for this to work copy
|
||||
# the file duo_api.tmpl to duo_api.conf and update for your environment
|
||||
# duo_api.conf.dist to duo_api.conf and update for your environment
|
||||
config = ConfigParser()
|
||||
if not config.read(splitext(argv[0])[0] + '.conf'):
|
||||
print("Missing/unreadable config file",splitext(argv[0])[0]+'.conf')
|
||||
|
||||
Reference in New Issue
Block a user