async def METHOD_NAME(self, username: str, password: str) -> common.ReturnValue[model.LoginReturn]:
    verify_authentication_enabled()
    # check if the user exists
    user = await data.User.get_one(username=username)
    if not user or not user.password_hash:
        raise exceptions.UnauthorizedException()
    try:
        nacl.pwhash.verify(user.password_hash.encode(), password.encode())
    except nacl.exceptions.InvalidkeyError:
        raise exceptions.UnauthorizedException()
    token = common.encode_token([str(const.ClientType.api.value)], expire=None)
    return common.ReturnValue(
        status_code=200,
        headers={"Authentication": f"Bearer {token}"},
        response=model.LoginReturn(
            user=user.to_dao(),
            token=token,
        ),
    )