mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
style: ktlint
This commit is contained in:
parent
fb9459bc83
commit
bf3a978f21
1 changed files with 22 additions and 22 deletions
|
|
@ -75,42 +75,42 @@ class OpenApiConfiguration(
|
|||
.version(appVersion)
|
||||
.description(
|
||||
"""
|
||||
Komga REST API.
|
||||
Komga REST API.
|
||||
|
||||
## Reference
|
||||
## Reference
|
||||
|
||||
Check the API reference:
|
||||
- on the [Komga website](https://komga.org/docs/openapi/komga-api)
|
||||
- on any running Komga instance at `/swagger-ui.html`
|
||||
- on [GitHub](https://raw.githubusercontent.com/gotson/komga/refs/heads/master/komga/docs/openapi.json)
|
||||
Check the API reference:
|
||||
- on the [Komga website](https://komga.org/docs/openapi/komga-api)
|
||||
- on any running Komga instance at `/swagger-ui.html`
|
||||
- on [GitHub](https://raw.githubusercontent.com/gotson/komga/refs/heads/master/komga/docs/openapi.json)
|
||||
|
||||
## Authentication
|
||||
## Authentication
|
||||
|
||||
Most endpoints require authentication. Authentication is done using either:
|
||||
- Basic Authentication
|
||||
- Passing an API Key in the `X-API-Key` header
|
||||
Most endpoints require authentication. Authentication is done using either:
|
||||
- Basic Authentication
|
||||
- Passing an API Key in the `X-API-Key` header
|
||||
|
||||
## Sessions
|
||||
## Sessions
|
||||
|
||||
Upon successful authentication, a session is created, and can be reused.
|
||||
Upon successful authentication, a session is created, and can be reused.
|
||||
|
||||
- By default, a `SESSION` cookie is set via `Set-Cookie` response header. This works well for browsers and clients that can handle cookies.
|
||||
- If you specify a header `X-Auth-Token` during authentication, the session ID will be returned via this same header. You can then pass that header again for subsequent requests to reuse the session.
|
||||
- By default, a `SESSION` cookie is set via `Set-Cookie` response header. This works well for browsers and clients that can handle cookies.
|
||||
- If you specify a header `X-Auth-Token` during authentication, the session ID will be returned via this same header. You can then pass that header again for subsequent requests to reuse the session.
|
||||
|
||||
If you need to set the session cookie later on, you can call `/api/v1/login/set-cookie` with `X-Auth-Token`. The response will contain the `Set-Cookie` header.
|
||||
If you need to set the session cookie later on, you can call `/api/v1/login/set-cookie` with `X-Auth-Token`. The response will contain the `Set-Cookie` header.
|
||||
|
||||
## Remember Me
|
||||
## Remember Me
|
||||
|
||||
During authentication, if a request parameter `remember-me` is passed and set to `true`, the server will also return a `remember-me` cookie. This cookie will be used to login automatically even if the session has expired.
|
||||
During authentication, if a request parameter `remember-me` is passed and set to `true`, the server will also return a `remember-me` cookie. This cookie will be used to login automatically even if the session has expired.
|
||||
|
||||
## Logout
|
||||
## Logout
|
||||
|
||||
You can explicitly logout an existing session by calling `/api/logout`. This would return a `204`.
|
||||
You can explicitly logout an existing session by calling `/api/logout`. This would return a `204`.
|
||||
|
||||
## Deprecation
|
||||
## Deprecation
|
||||
|
||||
API endpoints marked as deprecated will be removed in the next major version.
|
||||
""".trimIndent(),
|
||||
API endpoints marked as deprecated will be removed in the next major version.
|
||||
""".trimIndent(),
|
||||
).license(License().name("MIT").url("https://github.com/gotson/komga/blob/master/LICENSE")),
|
||||
).externalDocs(
|
||||
ExternalDocumentation()
|
||||
|
|
|
|||
Loading…
Reference in a new issue