-
Notifications
You must be signed in to change notification settings - Fork 0
Webhook Authorization
To support a variety of use cases, the Webhook Processor supports the following authorization methods:
- OAuth
- Basic
- API Key
- HMAC
Each is described in the following sections.
With OAuth, the Webhook processor will first retrieve a token from your Authorization Server.
Authorization Header:
Bearer <token>
The same token will be reused up until it gets close to its expiration time, at which point a new token will be retrieved.
We support a number of authorization methods for the token request. Each is described in the following subsections.
In all cases, we support adding parameters to the token request that are not related to authorization. The most common example would be scope.
In the following request examples this is represented with param1=value1. Params are optional from our end, and are only needed if your authorization server requires them.
With this method, the client_id and client_secret are set in the Authorization Header.
Authorization Header:
Basic base64Encode(<client_id> : <client_secret>)
Request Body:
grant_type=client_credentials
¶m1=value1
With this method, the client_id and client_secret are set in the request body.
Request Body:
grant_type=client_credentials
¶m1=value1
&client_id=<client_id>
&client_secret=<client_secret>
With this method, the rather than sending a client secret, the Webhook Processor generates a token and signs it with our private key. Your Authorization Server will need to validate the token using our public key.
Request Body:
grant_type=client_credentials
¶m1=value1
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=<assertion>
This method is very similar to Client Credentials (JWT Bearer), but is its own distinct grant type.
Request Body:
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
¶m1=value1
&assertion=<assertion>
With Basic Auth, you will need to provide POS Portal a username and password.
Authorization Header:
Basic base64Encode(<username> : <password>)
With API Key Auth, you will need to provide POS Portal an API Key.
Authorization Header:
Api-Key <apiKey>
With HMAC Auth, you will need to provide POS Portal a shared secret. This will be used to hash the request body.
Authorization Header:
sha256 hmacSha256(<requestBody>)
-
Resources