Skip to main content
Version: Next

basic_auth

File: core/src/utcp/data/auth_implementations/basic_auth.py

class BasicAuth (Auth)

Documentation

Authentication using HTTP Basic Authentication.

Uses the standard HTTP Basic Authentication scheme with username and password encoded in the Authorization header.

Attributes

  • auth_type: The authentication type identifier, always "basic".
  • username: The username for basic authentication. Recommended to use injected variables.
  • password: The password for basic authentication. Recommended to use injected variables.

Fields:

  • auth_type: Literal['basic']
  • username: str
  • password: str

class BasicAuthSerializer (Serializer[BasicAuth])

No class documentation available

Methods:

to_dict(self, obj: BasicAuth) -> dict

Convert a BasicAuth object to a dictionary.

Args

  • obj: The BasicAuth object to convert.

Returns

The dictionary converted from the BasicAuth object.

validate_dict(self, obj: dict) -> BasicAuth

Validate a dictionary and convert it to a BasicAuth object.

Args

  • obj: The dictionary to validate and convert.

Returns

The BasicAuth object converted from the dictionary.