From ad0d7a80eb1488f2540b25b90a0e9883caca7cc1 Mon Sep 17 00:00:00 2001 From: Kyrch Date: Mon, 28 Jul 2025 16:14:34 -0300 Subject: [PATCH] docs(graphql): removed authentication & validation sections (#118) (cherry picked from commit 124bf266cf0ce93374e2c7c16deb3a1b82f095a7) --- docs/.vitepress/config.js | 2 -- docs/graphql/intro/authentication/index.md | 36 ---------------------- docs/graphql/intro/index.md | 8 ----- docs/graphql/intro/validation/index.md | 9 ------ 4 files changed, 55 deletions(-) delete mode 100644 docs/graphql/intro/authentication/index.md delete mode 100644 docs/graphql/intro/validation/index.md diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 524ee32..faea2e6 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -585,8 +585,6 @@ export default { collapsed: false, items: [ { text: 'Rate Limiting', link: '/graphql/intro/ratelimiting/' }, - { text: 'Authentication', link: '/graphql/intro/authentication/' }, - { text: 'Validation', link: '/graphql/intro/validation/' }, ] }, { diff --git a/docs/graphql/intro/authentication/index.md b/docs/graphql/intro/authentication/index.md deleted file mode 100644 index 737d2a6..0000000 --- a/docs/graphql/intro/authentication/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Authentication ---- - -# Authentication - ---- - -The AnimeThemes API uses token-based authentication to grant the user access to mutations. - -## Token Authentication - -The AnimeThemes API uses the [**Bearer authentication scheme**](https://www.rfc-editor.org/rfc/rfc6750.html) to validate requests for mutations. - -The `Bearer` token in the `Authorization` request header must correspond to a valid API token. - -```sh -# Returns the currently authenticated user -curl -X POST - -H "Content-Type: application/json" - -H "Authorization: Bearer {token}" - -d "{\"query\": \"{ me { name } }\"}" - https://graphql.animethemes.moe -``` - -## Status Codes - -The AnimeThemes API uses framework-default response status codes for authenticated requests. - -| Code | Description | Examples | -| :--: | :--------------------------------------------------- | :----------------: | -| 200 | OK - request succeeded | DELETE, PATCH, PUT | -| 201 | Created - new resource was created | POST | -| 401 | Unauthorized - invalid or no authentication provided | All | -| 403 | Forbidden - request is not authorized for user | All | -| 404 | Not Found - no resource was found | All | \ No newline at end of file diff --git a/docs/graphql/intro/index.md b/docs/graphql/intro/index.md index c17f4e8..10f3dbe 100644 --- a/docs/graphql/intro/index.md +++ b/docs/graphql/intro/index.md @@ -22,14 +22,6 @@ The AnimeThemes API applies the standard named rate limiter of the Laravel Frame We provide an overview of managing request quotas. -## [Authentication](/graphql/intro/authentication/) - -The AnimeThemes API uses token-based authentication to grant the user access to mutations. - -## [Validation](/graphql/intro/validation/) - -The AnimeThemes API uses form requests to validate query parameters. - ## Terms of Use The AnimeThemes API applies the [**AnimeThemes Terms of Service**](https://animethemes.moe/about/terms-of-service). diff --git a/docs/graphql/intro/validation/index.md b/docs/graphql/intro/validation/index.md deleted file mode 100644 index bb4406c..0000000 --- a/docs/graphql/intro/validation/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Validation ---- - -# Validation - ---- - -// TODO \ No newline at end of file