-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Schemas for describing server configuration
- Loading branch information
1 parent
b4af7a7
commit 99b5f2a
Showing
7 changed files
with
70 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from typing import Any, Dict, List, Literal, Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class AboutAuthenticationProvider(BaseModel): | ||
provider: str | ||
mode: Literal["password", "external"] | ||
links: Dict[str, str] | ||
confirmation_message: Optional[str] = None | ||
|
||
|
||
class AboutAuthenticationLinks(BaseModel): | ||
whoami: str | ||
apikey: str | ||
refresh_session: str | ||
revoke_session: str | ||
logout: str | ||
|
||
|
||
class AboutAuthentication(BaseModel): | ||
required: bool | ||
providers: List[AboutAuthenticationProvider] | ||
links: Optional[AboutAuthenticationLinks] = None | ||
|
||
|
||
class About(BaseModel): | ||
api_version: int | ||
library_version: str | ||
formats: Dict[str, List[str]] | ||
aliases: Dict[str, Dict[str, List[str]]] | ||
queries: List[str] | ||
authentication: AboutAuthentication | ||
links: Dict[str, str] | ||
meta: Dict[str, Any] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters