mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-07-11 01:34:06 +02:00
docs(graphql): removed authentication & validation sections (#118)
(cherry picked from commit 124bf266cf0ce93374e2c7c16deb3a1b82f095a7)
This commit is contained in:
@@ -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/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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 |
|
||||
@@ -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).
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: Validation
|
||||
---
|
||||
|
||||
# Validation
|
||||
|
||||
---
|
||||
|
||||
// TODO
|
||||
Reference in New Issue
Block a user