Skip to content

Update docs #22

Merged
merged 36 commits into from
Apr 4, 2021
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c894551
Add variable support to mkdocs
campb303 Mar 24, 2021
b3efaf4
Update docs to include production URL variable
campb303 Mar 24, 2021
1a20353
Update auth docs to include fetch/curl examples for getting, passing …
campb303 Mar 24, 2021
0d7ccfa
style changes to the backend documentation
benne238 Mar 29, 2021
4838cac
fix for .autodoc-docstring css
benne238 Mar 29, 2021
cf7ebff
removed mentions of :private-memebers: from markdown files as autodoc…
benne238 Mar 29, 2021
f3b9d67
added additional information for the overview
benne238 Mar 29, 2021
fdf4aeb
update api.py docstrings
benne238 Mar 29, 2021
1fe26c6
Create get_access_token snippet
campb303 Apr 1, 2021
f631916
Merge branch 'update-docs' of github.itap.purdue.edu:ECN/webqueue2-ap…
campb303 Apr 1, 2021
f52d74f
Replace token with include
campb303 Apr 1, 2021
858dd3b
Remove cURL examples, finish basic usage examples
campb303 Apr 2, 2021
d5f573d
Remove cURL examples, simplify javascript examples
campb303 Apr 2, 2021
28ad8a1
Simplify examples, reference mkdocs variables
campb303 Apr 2, 2021
3d6f940
Add API section to table of contents
campb303 Apr 2, 2021
f4b0b89
Remove versioning TODO
campb303 Apr 2, 2021
72c0b8b
Update GitHub link
campb303 Apr 2, 2021
eea653c
Add comment for variables
campb303 Apr 2, 2021
57452f9
Remove unnecessary file
campb303 Apr 2, 2021
e3d40b5
Minor wording changes
campb303 Apr 2, 2021
034bb2d
Create new index file
campb303 Apr 2, 2021
5fdecb5
Clean comments
campb303 Apr 2, 2021
8336ab6
Finish installation docs
campb303 Apr 2, 2021
3f3f241
Remove code formatting for URL
campb303 Apr 2, 2021
47595e1
Update repo URL
campb303 Apr 2, 2021
a6740a4
Finish Items docs
campb303 Apr 3, 2021
468b23a
Finish Queues docs
campb303 Apr 3, 2021
59aea43
Remove MkAutoDocs file
campb303 Apr 4, 2021
897a976
Remove rest operator in nav
campb303 Apr 4, 2021
e1bea81
Add endpoint docs to Item
campb303 Apr 4, 2021
52d91ef
Add enpoint docs to Queue
campb303 Apr 4, 2021
d972fd8
Remove overview doc
campb303 Apr 4, 2021
d635c86
Remove MkAutoDocs plugin
campb303 Apr 4, 2021
4e67580
Remove MkAutoDocs from MkDocs
campb303 Apr 4, 2021
5d885fa
Remove MkAutoDocs styles
campb303 Apr 4, 2021
651da82
Add basic home page
campb303 Apr 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor wording changes
campb303 committed Apr 2, 2021
commit e3d40b5183018e7747207cedb087dc83709c3d33
6 changes: 3 additions & 3 deletions docs/api/Authentication.md
Original file line number Diff line number Diff line change
@@ -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";
@@ -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: