Skip to content

Add support for using environment variables for credentials

Pre-release
Pre-release
Compare
Choose a tag to compare
@dshafik dshafik released this 25 Dec 03:36
· 37 commits to master since this release

Added a new Client::createInstance() method that will try to use the environment and fallback to .edgerc.

This method will check in order:

  • AKAMAI_{SECTION}_* environment variables
  • if using the default section, AKAMAI_* environment variables
  • the specified (or default if none) section in .edgerc
  • if not using the default section, AKAMAI_* environment variables

This new method is the recommended way for instantiating an instance.

The environment variables are:

  • AKAMAI_HOST or AKAMAI_{SECTION}_HOST
  • AKAMAI_CLIENT_TOKEN or AKAMAI_{SECTION}_CLIENT_TOKEN
  • AKAMAI_CLIENT_SECRET or AKAMAI_{SECTION}_CLIENT_SECRET
  • AKAMAI_ACCESS_TOKEN or AKAMAI_{SECTION}_ACCESS_TOKEN