-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4ce0e8
commit e32a58f
Showing
19 changed files
with
1,873 additions
and
1,639 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
pydantic>=1.8.2,<2 | ||
aiohttp>=3.7.4 | ||
anyio>=3.7.1,<4.0.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
from enum import Enum | ||
from typing import Any, Dict, List, Optional, Union | ||
|
||
from pydantic import BaseModel, Extra, Field, validator | ||
from pydantic import BaseModel, ConfigDict, Field, field_validator | ||
|
||
from auth_server.models.jose import ( | ||
ECJWK, | ||
|
@@ -23,8 +23,7 @@ | |
|
||
|
||
class GnapBaseModel(BaseModel): | ||
class Config: | ||
allow_population_by_field_name = True | ||
model_config = ConfigDict(populate_by_name=True) | ||
|
||
|
||
class ProofMethod(str, Enum): | ||
|
@@ -47,7 +46,8 @@ class Key(GnapBaseModel): | |
cert: Optional[str] = None | ||
cert_S256: Optional[str] = Field(default=None, alias="cert#S256") | ||
|
||
@validator("proof", pre=True) | ||
@field_validator("proof", mode="before") | ||
@classmethod | ||
def expand_proof(cls, v: Union[str, Dict[str, Any]]) -> Dict[str, Any]: | ||
# If additional parameters are not required or used for a specific method, | ||
# the method MAY be passed as a string instead of an object. | ||
|
@@ -139,9 +139,7 @@ class SubjectIdentifier(GnapBaseModel): | |
# {"format": "email", "email": "[email protected]"} | ||
# see ietf-secevent-subject-identifiers | ||
format: SubjectIdentifierFormat | ||
|
||
class Config: | ||
extra = Extra.allow | ||
model_config = ConfigDict(extra="allow") | ||
|
||
|
||
class SubjectAssertion(GnapBaseModel): | ||
|
@@ -190,8 +188,8 @@ class Hints(GnapBaseModel): | |
|
||
class InteractionRequest(GnapBaseModel): | ||
start: List[StartInteractionMethod] | ||
finish: Optional[FinishInteraction] | ||
hints: Optional[Hints] | ||
finish: Optional[FinishInteraction] = None | ||
hints: Optional[Hints] = None | ||
|
||
|
||
class GrantRequest(GnapBaseModel): | ||
|
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
Oops, something went wrong.