soup.auth_domain
Module for [AuthDomain] class
Types 3
Server-side authentication.
A #SoupAuthDomain manages authentication for all or part of a soup.server.Server. To make a server require authentication, first create an appropriate subclass of #SoupAuthDomain, and then add it to the server with soup.server.Server.addAuthDomain.
In order for an auth domain to have any effect, you must add one or more paths to it (via soup.auth_domain.AuthDomain.addPath). To require authentication for all ordinary requests, add the path `"/"`. (Note that this does not include the special `""` URI (eg, "OPTIONS "), which must be added as a separate path if you want to cover it.)
If you need greater control over which requests should and shouldn't be authenticated, add paths covering everything you might want authenticated, and then use a filter (soup.auth_domain.AuthDomain.setFilter to bypass authentication for those requests that don't need it.
AuthDomainGidBuilder builder() static nothrowGet builder for [soup.auth_domain.AuthDomain] Returns: New builder objectsoup.types.AuthDomainFilter filter() @property nothrowGet `filter` property. Returns: The [soup.types.AuthDomainFilter] for the domain.void filter(soup.types.AuthDomainFilter propval) @property nothrowSet `filter` property. Params: propval = The [soup.types.AuthDomainFilter] for the domain.void * filterData() @property nothrowGet `filterData` property. Returns: Data to pass to the [soup.types.AuthDomainFilter].void filterData(void * propval) @property nothrowSet `filterData` property. Params: propval = Data to pass to the [soup.types.AuthDomainFilter].soup.types.AuthDomainGenericAuthCallback genericAuthCallback() @property nothrowGet `genericAuthCallback` property. Returns: The [soup.types.AuthDomainGenericAuthCallback].void genericAuthCallback(soup.types.AuthDomainGenericAuthCallback propval) @property nothrowSet `genericAuthCallback` property. Params: propval = The [soup.types.AuthDomainGenericAuthCallback].void * genericAuthData() @property nothrowGet `genericAuthData` property. Returns: The data to pass to the [soup.types.AuthDomainGenericAuthCallback].void genericAuthData(void * propval) @property nothrowSet `genericAuthData` property. Params: propval = The data to pass to the [soup.types.AuthDomainGenericAuthCallback].bool proxy() @property nothrowGet `proxy` property. Returns: Whether or not this is a proxy auth domain.string accepts(soup.server_message.ServerMessage msg) nothrowChecks if msg contains appropriate authorization for domain to accept it.void challenge(soup.server_message.ServerMessage msg) nothrowAdds a "WWW-Authenticate" or "Proxy-Authenticate" header to msg.bool checkPassword(soup.server_message.ServerMessage msg, string username, string password) nothrowChecks if msg authenticates to domain via username and password.bool covers(soup.server_message.ServerMessage msg) nothrowChecks if domain requires msg to be authenticated (according to its paths and filter function).void setFilter(soup.types.AuthDomainFilter filter) nothrowAdds filter as an authentication filter to domain.void setGenericAuthCallback(soup.types.AuthDomainGenericAuthCallback authCallback) nothrowSets auth_callback as an authentication-handling callback for domain.Fluent builder implementation template for soup.auth_domain.AuthDomain
T filter(soup.types.AuthDomainFilter propval) nothrowSet `filter` property. Params: propval = The [soup.types.AuthDomainFilter] for the domain. Returns: Builder instance for fluent chainingT filterData(void * propval) nothrowSet `filterData` property. Params: propval = Data to pass to the [soup.types.AuthDomainFilter]. Returns: Builder instance for fluent chainingT genericAuthCallback(soup.types.AuthDomainGenericAuthCallback propval) nothrowSet `genericAuthCallback` property. Params: propval = The [soup.types.AuthDomainGenericAuthCallback]. Returns: Builder instance for fluent chainingT genericAuthData(void * propval) nothrowSet `genericAuthData` property. Params: propval = The data to pass to the [soup.types.AuthDomainGenericAuthCallback]. Returns: Builder instance for fluent chainingT proxy(bool propval) nothrowSet `proxy` property. Params: propval = Whether or not this is a proxy auth domain. Returns: Builder instance for fluent chainingT realm(string propval) nothrowSet `realm` property. Params: propval = The realm of this auth domain. Returns: Builder instance for fluent chainingFluent builder for soup.auth_domain.AuthDomain