types

class auth_middleware.types.JWKS(*, keys: List[Dict[str, str]] | None = [], timestamp: int | None = None, usage_counter: int | None = 0)
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'keys': FieldInfo(annotation=Union[List[Dict[str, str]], NoneType], required=False, default=[]), 'timestamp': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'usage_counter': FieldInfo(annotation=Union[int, NoneType], required=False, default=0)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class auth_middleware.types.JWTAuthorizationCredentials(*, jwt_token: str, header: Dict[str, str], claims: Dict[str, Any], signature: str, message: str)
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'claims': FieldInfo(annotation=Dict[str, Any], required=True), 'header': FieldInfo(annotation=Dict[str, str], required=True), 'jwt_token': FieldInfo(annotation=str, required=True), 'message': FieldInfo(annotation=str, required=True), 'signature': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class auth_middleware.types.User(*, id: Annotated[str, MaxLen(max_length=500)], name: Annotated[str | None, MaxLen(max_length=500)] = None, email: Annotated[EmailStr | None, MaxLen(max_length=500)] = None, groups: List[str] | None = [])

Application User

Args:

BaseModel (BaseModel): Inherited properties

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'email': FieldInfo(annotation=Union[EmailStr, NoneType], required=False, default=None, json_schema_extra={'description': "User's email address (Optional)", 'example': 'useradmin@user.com'}, metadata=[MaxLen(max_length=500)]), 'groups': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=[], json_schema_extra={'description': 'List of user groups', 'example': '["admin", "user"]'}), 'id': FieldInfo(annotation=str, required=True, json_schema_extra={'description': 'Unique user ID (sub)', 'example': '0ujsswThIGTUYm2K8FjOOfXtY1K'}, metadata=[MaxLen(max_length=500)]), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, json_schema_extra={'description': 'User name', 'example': 'test_user'}, metadata=[MaxLen(max_length=500)])}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class auth_middleware.types.UserCredentials(*, id: Annotated[str, MaxLen(max_length=500)], name: Annotated[str | None, MaxLen(max_length=500)] = None, email: Annotated[EmailStr | None, MaxLen(max_length=500)] = None, groups: List[str] | None = [], hashed_password: Annotated[str, MaxLen(max_length=500)])

User object with credentials included

Args:

User (_type_): _description_

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'email': FieldInfo(annotation=Union[EmailStr, NoneType], required=False, default=None, json_schema_extra={'description': "User's email address (Optional)", 'example': 'useradmin@user.com'}, metadata=[MaxLen(max_length=500)]), 'groups': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=[], json_schema_extra={'description': 'List of user groups', 'example': '["admin", "user"]'}), 'hashed_password': FieldInfo(annotation=str, required=True, json_schema_extra={'description': 'Hashed password', 'example': '0ujsswThIGTUYm2K8FjOOfXtY1K'}, metadata=[MaxLen(max_length=500)]), 'id': FieldInfo(annotation=str, required=True, json_schema_extra={'description': 'Unique user ID (sub)', 'example': '0ujsswThIGTUYm2K8FjOOfXtY1K'}, metadata=[MaxLen(max_length=500)]), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, json_schema_extra={'description': 'User name', 'example': 'test_user'}, metadata=[MaxLen(max_length=500)])}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.