From 1f3dfce3ed800ef706982cbdf382ea9449f3e82b Mon Sep 17 00:00:00 2001 From: Tucker Beck Date: Thu, 30 May 2024 15:28:52 -0700 Subject: [PATCH 1/2] Restored optional TokenPayload fields --- armasec/token_payload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armasec/token_payload.py b/armasec/token_payload.py index 382a4d8..10e8d4c 100644 --- a/armasec/token_payload.py +++ b/armasec/token_payload.py @@ -22,8 +22,8 @@ class TokenPayload(BaseModel): sub: str permissions: List[str] = Field(list()) - expire: datetime = Field(None, validation_alias=AliasChoices("exp", "expire")) - client_id: str = Field(None, validation_alias=AliasChoices("azp", "client_id")) + expire: Optional[datetime] = Field(None, validation_alias=AliasChoices("exp", "expire")) + client_id: Optional[str] = Field(None, validation_alias=AliasChoices("azp", "client_id")) original_token: Optional[str] = None model_config = ConfigDict(extra="allow") From a98fdab54d5dd4478caf9a2f95d62080efa55160 Mon Sep 17 00:00:00 2001 From: Tucker Beck Date: Thu, 30 May 2024 15:30:49 -0700 Subject: [PATCH 2/2] Bumped version and added changelog --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d15cf89..c3129ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +## v2.0.1 - 2024-05-29 + +- Restored optional TokenPayload fields. + + ## v2.0.0 - 2024-05-28 - Upgraded pydantic base version to 2.7. diff --git a/pyproject.toml b/pyproject.toml index 651d20f..c1aa4b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "armasec" -version = "2.0.0" +version = "2.0.1" description = "Injectable FastAPI auth via OIDC" authors = ["Omnivector Engineering Team "] license = "MIT"