-
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 (#862)
* Move Schemas for describing server configuration * Update CHANGELOG --------- Co-authored-by: Dan Allan <[email protected]>
- Loading branch information
1 parent
bed06d6
commit ff14dd1
Showing
8 changed files
with
88 additions
and
69 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
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