diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..83274a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.conf diff --git a/apiget.py b/apiget.py index 503ce35..7b8a952 100755 --- a/apiget.py +++ b/apiget.py @@ -6,10 +6,13 @@ # This should be a lot simpler than it is, but none of the oath2 # modules seem to work well, so we do it by hand here. # -clientid = 'XXXXXXXX' -clientsecret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' -host = 'api.cloudpassage.com' +# This information is findable at https://portal.cloudpassage.com/settings/users +config ={} +execfile("config.conf",config) +clientid = config['clientid'] #these must be defined in config.conf +clientsecret = config['clientsecret'] #these must be defined in config.conf +host = config['host'] import urllib import httplib diff --git a/config.conf b/config.conf new file mode 100644 index 0000000..8b2977f --- /dev/null +++ b/config.conf @@ -0,0 +1,12 @@ +''' +Your account's Halo ID and Secret Key are findable here: https://portal.cloudpassage.com/settings/users + +Variables: +clientid: API Key ID +clientsecret: API Secret Key +host: API host +''' + +clientid = '' +clientsecret = '' +host = 'api.cloudpassage.com'