chore: fix formatting, add periods, and change example tokens to opaque ones (hex)

This commit is contained in:
SauceyRed 2025-04-29 18:05:11 +02:00
parent 0211348abc
commit 6e4423e08b
Signed by: sauceyred
GPG key ID: 4BEDD9C389F924D0
2 changed files with 31 additions and 31 deletions

View file

@ -10,10 +10,10 @@ Authenticates the user, and issues an access token for future requests.
| Name | Type | Description | | Name | Type | Description |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------- | | ----------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| identifier | string | User's gorb ID. One of identifier and email **must** be implemented | | identifier | string | User's gorb ID. One of identifier and email **must** be implemented. |
| email | string | User's email. One of identifier and email **must** be implemented | | email | string | User's email. One of identifier and email **must** be implemented. |
| password | string | **Required**: The user's password (we need to figure out how exactly we're hashing + salting it on the client) | | password | string | **Required**: The user's password (we need to figure out how exactly we're hashing + salting it on the client). |
| device_name | string | Name to help the user identify the device in their session list | | device_name | string | Name to help the user identify the device in their session list. |
```json ```json
{ {
@ -29,8 +29,8 @@ Authenticates the user, and issues an access token for future requests.
| Status | Description | | Status | Description |
| ------ | ---------------------------------------------- | | ------ | ---------------------------------------------- |
| 200 | Authentication successful | | 200 | Authentication successful. |
| 400 | The post request included poorly formated data | | 400 | The post request included poorly formated data. |
| 403 | Part of the cridentials are invalid. | | 403 | Part of the cridentials are invalid. |
--- ---
@ -39,16 +39,16 @@ Authenticates the user, and issues an access token for future requests.
| Name | Type | Description | | Name | Type | Description |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- | | ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| access_token | string | **Required**: The access token that will be used for further authentication | | access_token | string | **Required**: The access token that will be used for further authentication. |
| user_id | string | **Required**: The full gorb ID for the account | | user_id | string | **Required**: The full gorb ID for the account. |
| expires_in | int | How many seconds until the token expires and is invalidated | | expires_in | int | How many seconds until the token expires and is invalidated. |
| refresh_token | string | The refresh token that will be used to refresh the access token. Required for avoiding users having to log in after access token expiration. | | refresh_token | string | The refresh token that will be used to refresh the access token. Required for avoiding users having to log in after access token expiration. |
```json ```json
{ {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJAcmFkaWFsXzQ3NDA6Z29yYi5hcHAiLCJpZGVudGlmaWVyIjoicmFkaWFsXzQ3NDAiLCJpYXQiOjE3NDM4ODgyNDAsImV4cCI6MTc0NTk2MTg0MH0.MZsOfeOm98K2sgtJ3hIDy0iyX27tDJRgW5iSayBJIDM", "access_token": "35e404d160b0eac766cb85cf513670baa627d1e918c4813c3f099e31de300b63",
"user_id": "@radial_4740:gorb.app", "user_id": "@radial_4740:gorb.app",
"expires_in": 86400, "expires_in": 86400,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJAcmFkaWFsXzQ3NDA6Z29yYi5hcHAiLCJpZGVudGlmaWVyIjoicmFkaWFsXzQ3NDAiLCJpYXQiOjE3NDM4ODgyNDAsImV4cCI6MTc0NjQ4MDI0MH0.OvUDelrhELNBhizvAj7wm13YpDLYluI4sPeBmT5sPUg" "refresh_token": "d9ce91b7b643d5580ea605ad09ba1e13aef704c412194c00c592b96a62049587"
} }
``` ```

View file

@ -10,10 +10,10 @@ Registers the user, and issues an access token for future requests.
| Name | Type | Description | | Name | Type | Description |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------- | | ----------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| identifier | string | **Required** User's desired ID | | identifier | string | **Required** User's desired ID. |
| email | string | **Required** User's email | | email | string | **Required** User's email. |
| password | string | **Required**: The user's password (we need to figure out how exactly we're hashing + salting it on the client) | | password | string | **Required**: The user's password (we need to figure out how exactly we're hashing + salting it on the client). |
| device_name | string | Name to help the user identify the device in their session list | | device_name | string | Name to help the user identify the device in their session list. |
```json ```json
{ {
@ -29,10 +29,10 @@ Registers the user, and issues an access token for future requests.
## Responses ## Responses
| Status | Description | | Status | Description |
| ------ | ----------------------------------------------------------------------------------------------------------------------------- | | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| 200 | Registration successful | | 200 | Registration successful. |
| 400 | The post request included poorly formated data | | 400 | The post request included poorly formated data. |
| 403 | Signups are disabled, gorb ID not available, email already in use, or password doesn't meet the minimum security requirements | | 403 | Signups are disabled, gorb ID not available, email already in use, or password doesn't meet the minimum security requirements. |
--- ---
@ -40,17 +40,17 @@ Registers the user, and issues an access token for future requests.
| Name | Type | Description | | Name | Type | Description |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- | | ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| access_token | string | **Required**: The access token that will be used for further authentication | | access_token | string | **Required**: The JWT access token that will be used for further authentication. |
| user_id | string | **Required**: The full gorb ID for the account | | user_id | string | **Required**: The full gorb ID for the account. |
| expires_in | int | How many seconds until the token expires and is invalidated | | expires_in | int | How many seconds until the token expires and is invalidated. |
| refresh_token | string | The refresh token that will be used to refresh the access token. Required for avoiding users having to log in after access token expiration. | | refresh_token | string | The JWT refresh token that will be used to refresh the access token. Required for avoiding users having to log in after access token expiration. |
```json ```json
{ {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJAcmFkaWFsXzQ3NDA6Z29yYi5hcHAiLCJpZGVudGlmaWVyIjoicmFkaWFsXzQ3NDAiLCJpYXQiOjE3NDM4ODgyNDAsImV4cCI6MTc0NTk2MTg0MH0.MZsOfeOm98K2sgtJ3hIDy0iyX27tDJRgW5iSayBJIDM", "access_token": "13aa5fe2ae5874fb9616e68c25632a146552584ac238a3e4ede08174fbfc4f45",
"user_id": "@radial_4740:gorb.app", "user_id": "@radial_4740:gorb.app",
"expires_in": 86400, "expires_in": 86400,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJAcmFkaWFsXzQ3NDA6Z29yYi5hcHAiLCJpZGVudGlmaWVyIjoicmFkaWFsXzQ3NDAiLCJpYXQiOjE3NDM4ODgyNDAsImV4cCI6MTc0NjQ4MDI0MH0.OvUDelrhELNBhizvAj7wm13YpDLYluI4sPeBmT5sPUg" "refresh_token": "8556a85b8912a78572cd67b21350e188039f656a0781dab20fab7b72a11d2a93"
} }
``` ```