name = OAuth Client Credentials Example
$ API_ORIGIN = [[ api_origin = https://api.example.com ]]
$ ISSUER = [[ issuer = https://login.example.com ]]
oauth api
grant = client_credentials
issuer = {{ ISSUER }}
client_id = secret.env("HEN_CLIENT_ID")
client_secret = secret.env("HEN_CLIENT_SECRET")
scope = read:profile
param audience = {{ API_ORIGIN }}
access_token -> $API_ACCESS_TOKEN
token_type -> $API_TOKEN_TYPE
---
Get profile
auth = api
GET {{ API_ORIGIN }}/me
* X-Token-Type = {{ API_TOKEN_TYPE }}
^ & status == 200