Example function for an OpenFaaS ETL function or background job which uses an OAuth2 token.
The OAuth2 token is obtained when a human user present at the keyboard visits the function for the first time.
Subsequent runs use the saved access token and refresh token to access the protected API.