Skip to content

Commit

Permalink
Merge pull request #55 from omnivector-solutions/tucker/restore-optio…
Browse files Browse the repository at this point in the history
…nal-token-payload-fields

Restored optional TokenPayload fields
  • Loading branch information
dusktreader authored May 30, 2024
2 parents 87c0148 + a98fdab commit 3d65247
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions armasec/token_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 3d65247

Please sign in to comment.