| Term | Description |
|---|---|
| Client | Application |
| Public Client | Application involves user interaction |
| Private Client | Application without user interaction such as API |
| User / Resource Owner | End user |
| Resources | Data related to user or business |
| Resource Server | Service where data is stored |
| Auth Server | Service that authenticates and authorizes the client to access data |
| Grant Types | Ways to get tokens from Auth Server |
| Authorization Code | A temporary code received by the client after the user successfully authenticates and authorizes the app, used to obtain an access token |
| ID Token | Token that contains user identity information |
| Access Token | Token that allows a client to access protected resources |
| Refresh Token | Token used to obtain a new access token if the current access token expires |
| JWT | A type of token encoded in JSON format with claims, represented as a compact string consisting of a header, payload, and signature |
| Reference Token | A type of token that is non-readable and typically a randomly generated string, where the contents are not accessible or interpretable without validation by the authorization server |
| Client ID | A unique identifier issued to a client application by the authorization server |
| Client Secret | A secret value associated with the client ID, used to authenticate the client application during token requests |
| Scope | A set of permissions defined by the client, indicating the level of access the client has for accessing the protected resources |
| Redirect URI | The URL to which the user is redirected after authentication and authorization, where the authorization code or access token is sent (in the context of PKCE) |

Endpoint: POST /connect/token| Name | Data Type | Required | Description |
|---|---|---|---|
| Content-Type | String | Yes | Set it to "application/x-www-form-urlencoded" |
| Name | Data Type | Required | Description |
|---|---|---|---|
| grant_type | String | Yes | Must be set to "client_credentials" to indicate the use of the Client Credentials grant type |
| client_id | String | Yes | The unique identifier of the client application that makes the request |
| client_secret | String | Yes | The secret value of the client application that makes the request |
curl --location 'https://wb-api-auth-server.azurewebsites.net/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=yourclientid' \
--data-urlencode 'client_secret=yourclientsecret'
200 OK response will be returned, along with the following JSON data in the response body.| Name | Data Type | Required | Description |
|---|---|---|---|
| access_token | String | Yes | The access token issued by the authorization server |
| expires_in | Integer | Yes | The number of seconds until the access token expires |
| token_type | String | Yes | The type of token issued specifies how the access token may be used. Always "Bearer" |
| scope | String | Yes | A space-separated list of scopes which have been granted with this token |
{
"access_token": "<token>",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "coreapi"
}| Name | Data Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | Valid access token following the format "Bearer <Access Token>" |
curl --location 'https://wb-api-auth-server.azurewebsites.net/data' \
--header 'Authorization: Bearer <token>'