AuthDomain

open class AuthDomain(pointer: <Error class: unknown class><<Error class: unknown class>>)

Server-side authentication.

A #SoupAuthDomain manages authentication for all or part of a class@Server. To make a server require authentication, first create an appropriate subclass of #SoupAuthDomain, and then add it to the server with method@Server.add_auth_domain.

In order for an auth domain to have any effect, you must add one or more paths to it (via method@AuthDomain.add_path). 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 (method@AuthDomain.set_filter to bypass authentication for those requests that don't need it.

Skipped during bindings generation

  • method filter: Property has no getter

  • method filter-data: Property has no getter nor setter

  • method generic-auth-callback: Property has no getter

  • method generic-auth-data: Property has no getter nor setter

  • method proxy: Property has no getter nor setter

Inheritors

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val realm: String

The realm of this auth domain.

Link copied to clipboard
val soupAuthDomainPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun accepts(msg: ServerMessage): String?

Checks if @msg contains appropriate authorization for @domain to accept it.

Link copied to clipboard
open fun addPath(path: String)

Adds @path to @domain.

Link copied to clipboard
open fun challenge(msg: ServerMessage)

Adds a "WWW-Authenticate" or "Proxy-Authenticate" header to @msg.

Link copied to clipboard
open fun checkPassword(msg: ServerMessage, username: String, password: String): Boolean

Checks if @msg authenticates to @domain via @username and

Link copied to clipboard
open fun covers(msg: ServerMessage): Boolean

Checks if @domain requires @msg to be authenticated (according to its paths and filter function).

Link copied to clipboard
open fun removePath(path: String)

Removes @path from @domain.

Link copied to clipboard
open fun setFilter(filter: AuthDomainFilter)

Adds @filter as an authentication filter to @domain.

Link copied to clipboard

Sets @auth_callback as an authentication-handling callback for @domain.