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[[...], bool], *user_data: Any) 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[[...], bool]

The AuthDomainBasicAuthCallback.

props.auth_data: None

The data to pass to the AuthDomainBasicAuthCallback.