Files
bookhoard/bruno/user/auth/Refresh Token.bru
T
john-okeefe 6ed69005b5 refactor(bruno): standardize all variables to snake_case naming convention
Standardize all Bruno environment variables to use snake_case convention
(aligned with Go naming practices) and remove duplicate camelCase variants.

Changes:
- Environment file cleanup:
  - Remove: baseUrl, ebookid, fakebookid, libraryId, mediaItemId, isVisible, refreshToken
  - Standardize: fakebookid → fake_book_id, isVisible → is_visible, refreshToken → refresh_token
  - All variables now use consistent snake_case format

- Update all Bruno requests to use standardized variables:
  - ebooks: {{ebookid}} → {{ebook_id}}
  - library: {{libraryId}} → {{library_id}}
  - media-items: {{mediaItemId}} → {{media_item_id}}
  - visibility: {{isVisible}} → {{is_visible}}
  - auth: {{refreshToken}} → {{refresh_token}}

Benefits:
- Single source of truth for each variable
- Consistent with Go naming conventions
- No ambiguity about which variable name to use
- Cleaner, more maintainable codebase
2026-01-29 10:06:00 -05:00

88 lines
2.2 KiB
Plaintext

{
"meta": {
"name": "Refresh Access Token",
"type": "http",
"seq": 1,
"auth": "Inherit"
},
"request": {
"method": "POST",
"header": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": {
"type": "json",
"json": {
"refresh_token": "{{refresh_token}}"
}
},
"url": {
"raw": "{{base_url}}/api/auth/refresh",
"host": ["{{base_url}}"],
"path": ["api", "auth", "refresh"]
},
"description": "Refreshes an access token using a valid refresh token. Returns a new access token with 1-hour expiration."
},
"response": [
{
"name": "Success Response",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"type": "json",
"json": {
"refresh_token": "valid-refresh-token-uuid"
}
},
"url": {
"raw": "{{base_url}}/api/auth/refresh",
"host": ["{{base_url}}"],
"path": ["api", "auth", "refresh"]
}
},
"status": 200,
"code": 200,
"header": [
{
"name": "content-type",
"value": "application/json"
}
],
"body": "{\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"token_type\": \"Bearer\",\n \"expires_in\": 3600\n}",
"description": "Returns a new access token that expires in 1 hour (3600 seconds)."
},
{
"name": "Invalid Refresh Token",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"type": "json",
"json": {
"refresh_token": "invalid-token"
}
},
"url": {
"raw": "{{base_url}}/api/auth/refresh",
"host": ["{{base_url}}"],
"path": ["api", "auth", "refresh"]
}
},
"status": 401,
"code": 401,
"header": [
{
"name": "content-type",
"value": "application/json"
}
],
"body": "{\n \"error\": \"invalid or expired refresh token\"\n}",
"description": "Returned when the refresh token is invalid, expired, or has been revoked."
}
]
}