Skip to content

Commit

Permalink
fix: update cognito settings model config
Browse files Browse the repository at this point in the history
  • Loading branch information
markomirosavljev committed Aug 29, 2023
1 parent 9c7605c commit f2ecfda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="fastapi-cognito",
version="2.4.1",
version="2.4.2",
author="Marko Mirosavljev",
author_email="mirosavljevm023@gmail.com",
description="Basic AWS cognito authentication package for FastAPI",
Expand Down
7 changes: 3 additions & 4 deletions src/fastapi_cognito/settings_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
from typing import Any

import yaml
from pydantic_settings import BaseSettings
from pydantic_settings import BaseSettings, SettingsConfigDict


class CognitoSettings(BaseSettings):
"""
This class contains all mandatory fields which should get values from
provided config file
"""
model_config = SettingsConfigDict(extra="ignore")

check_expiration: bool
jwt_header_name: str
jwt_header_prefix: str
userpools: dict[str, dict[str, Any]]

class Config:
extra = "ignore"

@classmethod
def from_global_settings(cls, global_settings: BaseSettings):
"""
Expand Down

0 comments on commit f2ecfda

Please sign in to comment.