auth
File: core/src/utcp/data/auth.py
class Auth
Documentation
Authentication details for a provider.
Attributes
auth_type
: The authentication type identifier.
Fields:
- auth_type: str
class AuthSerializer (Serializer[Auth])
Documentation
Serializer for authentication details.
Defines the contract for serializers that convert authentication details to and from
Dictionaries For Storage Or Transmission. Serializers Are Responsible For
- Converting authentication details to dictionaries for storage or transmission
- Converting dictionaries back to authentication details
- Ensuring data consistency during serialization and deserialization
Fields:
- auth_serializers: dict[str, Serializer[Auth]]
Methods:
to_dict(self, obj: Auth) -> dict
Convert an Auth object to a dictionary.
Args
obj
: The Auth object to convert.
Returns
The dictionary converted from the Auth object.
validate_dict(self, obj: dict) -> Auth
Validate a dictionary and convert it to an Auth object.
Args
obj
: The dictionary to validate and convert.
Returns
The Auth object converted from the dictionary.