AuthDomainBasic#

class AuthDomainBasic(**properties: Any)#

Superclasses: AuthDomain, Object

Server-side “Basic” authentication.

SoupAuthDomainBasic handles the server side of HTTP “Basic” (ie, cleartext password) authentication.

Methods#

class AuthDomainBasic
set_auth_callback(callback: Callable[[AuthDomainBasic, ServerMessage, str, str, Any], bool], user_data: Any = None) None#

Sets the callback that domain will use to authenticate incoming requests.

For each request containing authorization, domain will invoke the callback, and then either accept or reject the request based on callback's return value.

You can also set the auth callback by setting the auth_callback and auth_data properties, which can also be used to set the callback at construct time.

Parameters:
  • callback – the callback

  • user_data – data to pass to auth_callback

Properties#

class AuthDomainBasic
props.auth_callback: Callable[[AuthDomainBasic, ServerMessage, str, str, Any], bool]#

The type of the None singleton.

props.auth_data: Any#

The type of the None singleton.