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 24 Dec 21:28
· 17 commits to master since this release

Added a new Authentication::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