Authentication and User Management#

class AuthTypeEnum(value)[source]#

Bases: str, Enum

password = 'password'#
is_valid_password(password)[source]#
Parameters:

password (str)

Return type:

None

is_valid_username(username)[source]#
Parameters:

username (str)

Return type:

None

is_valid_groupname(groupname)[source]#
Parameters:

groupname (str)

Return type:

None

class GroupInfo(*, id=None, groupname, description='')[source]#

Bases: BaseModel

Information about a group

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Parameters:
  • id (int | None)

  • groupname (str)

  • description (str)

class Config[source]#

Bases: object

extra = 'forbid'#
id: int | None#
groupname: str#
description: str#
class UserInfo(*, id=None, auth_type=AuthTypeEnum.password, username, role, groups=[], enabled, fullname='', organization='', email='')[source]#

Bases: BaseModel

Information about a user

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Parameters:
  • id (int | None)

  • auth_type (AuthTypeEnum)

  • username (str)

  • role (str)

  • groups (List[str])

  • enabled (bool)

  • fullname (ConstrainedStrValue)

  • organization (ConstrainedStrValue)

  • email (ConstrainedStrValue)

class Config[source]#

Bases: object

validate_assignment = True#
extra = 'forbid'#
id: int | None#
auth_type: AuthTypeEnum#
username: str#
role: str#
groups: List[str]#
enabled: bool#
fullname: constr(max_length=128)#
organization: constr(max_length=128)#
email: constr(max_length=128)#