mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-08 19:28:38 +01:00
feat(api): report login methods and add GET /capabilities
This commit is contained in:
parent
294c1a9a6a
commit
28d023449d
17 changed files with 458 additions and 79 deletions
10
api/openapi/components/schemas/Capabilities.yaml
Normal file
10
api/openapi/components/schemas/Capabilities.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
type: object
|
||||
description: |
|
||||
Capability modules this server implements, keyed by module. Keys are optional; a missing key means the
|
||||
module is not implemented. New modules are added as new optional keys. These are server facts, not what
|
||||
the calling token may use.
|
||||
properties:
|
||||
core:
|
||||
$ref: ./CoreCapability.yaml
|
||||
password:
|
||||
$ref: ./PasswordCapability.yaml
|
||||
5
api/openapi/components/schemas/CoreCapability.yaml
Normal file
5
api/openapi/components/schemas/CoreCapability.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
type: object
|
||||
description: The mandatory core module.
|
||||
required: [version]
|
||||
properties:
|
||||
version: {type: integer, description: Module version. Bumped only on semantic change.}
|
||||
8
api/openapi/components/schemas/LoginMethods.yaml
Normal file
8
api/openapi/components/schemas/LoginMethods.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
type: object
|
||||
description: |
|
||||
Login methods this server accepts, keyed by method. A missing key means the method is not offered.
|
||||
Keys are optional on purpose: discovery is read by clients of any version against servers of any
|
||||
version, so new methods are added as new optional keys. Clients ignore keys they do not know.
|
||||
properties:
|
||||
password:
|
||||
$ref: ./PasswordLoginMethod.yaml
|
||||
5
api/openapi/components/schemas/PasswordCapability.yaml
Normal file
5
api/openapi/components/schemas/PasswordCapability.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
type: object
|
||||
description: The password login module (login, first-admin setup, password change).
|
||||
required: [version]
|
||||
properties:
|
||||
version: {type: integer, description: Module version. Bumped only on semantic change.}
|
||||
2
api/openapi/components/schemas/PasswordLoginMethod.yaml
Normal file
2
api/openapi/components/schemas/PasswordLoginMethod.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
type: object
|
||||
description: Username and password login (`POST /auth/login`). No settings yet.
|
||||
|
|
@ -15,8 +15,4 @@ properties:
|
|||
type: boolean
|
||||
description: True until the first admin user has been created.
|
||||
loginMethods:
|
||||
type: array
|
||||
description: Login methods this server accepts. New methods may be added; clients ignore values they do not recognise.
|
||||
items:
|
||||
type: string
|
||||
enum: [password]
|
||||
$ref: ./LoginMethods.yaml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue