Skip to content

Commit

Permalink
Minor wording changes
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Apr 2, 2021
1 parent 57452f9 commit e3d40b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/api/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ All API calls require an access token. You can get an access token by making a P
To interact with the API, add an `Authorization` header to your request with a value of `Bearer TOKEN` where `TOKEN` is your access token.

### Example:
!!! example "Get item `ce100`"
!!! example "Get item CE 100."
```js
let access_token = "{{ example_access_token }}";
let queue = "ce";
Expand All @@ -46,14 +46,14 @@ To interact with the API, add an `Authorization` header to your request with a v
```

## Refreshing Access Tokens
When you login, you'll receive an access token that expires 15 minutes after creation as well as two cookies needed to get a new access token:
When you login, you'll receive an access token that expires 15 minutes after creation as well as two cookies needed to get a new access token. Those cookies are:

Name | Value | Path | Expiration | SameSite
-- | -- | -- | -- | --
`refresh_token_cookie` | Your refresh token. | `/api/tokens/refresh` | 30 Days | Yes
`csrf_refresh_token` | Additional verification data. (e.g. `{{ example_csrf_token }}`) | `/` | Session | Yes

The `refresh_token_cookie` is used to generate a new access token and will be sent back to the server with every request automatically. The `csrf_refresh_token` is used to verify the `refresh_token_cookie` and needs sent back as an `X-CSRF-TOKEN` header.
The `refresh_token_cookie` is used to generate a new access token and will be sent back to the server with every request automatically. It expires 30 days after login. The `csrf_refresh_token` is used to verify the `refresh_token_cookie` and needs sent back as an `X-CSRF-TOKEN` header.

To refresh your access token, make a POST request to the `/api/tokens/refresh` endpoint with the value of the `csrf_refresh_token` cookies inside a `X-CSRF-TOKEN` header:

Expand Down

0 comments on commit e3d40b5

Please sign in to comment.