Skip to content

Commit

Permalink
Replace | with union
Browse files Browse the repository at this point in the history
  • Loading branch information
mmasztalerczuk committed Dec 1, 2023
1 parent d271aeb commit c842646
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fastapi_another_jwt_auth/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
MyType = Union[Sequence[Any], Set[Any]]

class LoadConfig(BaseModel):
authjwt_token_location: Optional[Sequence[StrictStr] | Set[StrictStr]] = {'headers'}
authjwt_token_location: Optional[Union[Sequence[StrictStr], Set[StrictStr]]] = {'headers'}
authjwt_secret_key: Optional[StrictStr] = None
authjwt_public_key: Optional[StrictStr] = None
authjwt_private_key: Optional[StrictStr] = None
Expand All @@ -22,7 +22,7 @@ class LoadConfig(BaseModel):
authjwt_decode_issuer: Optional[StrictStr] = None
authjwt_decode_audience: Optional[Union[StrictStr,Sequence[StrictStr]]] = None
authjwt_denylist_enabled: Optional[StrictBool] = False
authjwt_denylist_token_checks: Optional[Sequence[StrictStr] | Set[StrictStr]] = {'access','refresh'}
authjwt_denylist_token_checks: Optional[Union[Sequence[StrictStr], Set[StrictStr]]] = {'access','refresh'}
authjwt_header_name: Optional[StrictStr] = "Authorization"
authjwt_header_type: Optional[StrictStr] = "Bearer"
authjwt_access_token_expires: Optional[Union[StrictBool,StrictInt,timedelta]] = timedelta(minutes=15)
Expand All @@ -44,7 +44,7 @@ class LoadConfig(BaseModel):
authjwt_refresh_csrf_cookie_path: Optional[StrictStr] = "/"
authjwt_access_csrf_header_name: Optional[StrictStr] = "X-CSRF-Token"
authjwt_refresh_csrf_header_name: Optional[StrictStr] = "X-CSRF-Token"
authjwt_csrf_methods: Optional[Sequence[StrictStr] | Set[StrictStr]] = {'POST','PUT','PATCH','DELETE'}
authjwt_csrf_methods: Optional[Union[Sequence[StrictStr], Set[StrictStr]]] = {'POST','PUT','PATCH','DELETE'}

@field_validator('authjwt_access_token_expires')
@classmethod
Expand Down

0 comments on commit c842646

Please sign in to comment.