It derives from <GObject>.
The abstract base class for handling authentication.
Specific HTTP Authentication mechanisms are implemented by its subclasses, but applications never need to be aware of the specific subclasses being used.
Auth objects store the authentication data associated with a
given bit of web space. They are created automatically by
Session.
parent-instanceThe authority (host:port) being authenticated to.
Its value is a string, or #f.
Set it with (set! (auth:authority self) value).
Whether or not the auth has been authenticated.
Its value is a boolean.
It is read only.
Whether or not the auth has been cancelled.
Its value is a boolean.
It is read only.
Whether or not the auth is for a proxy server.
Its value is a boolean.
Set it with (set! (auth:is-for-proxy self) value).
The authentication realm.
Its value is a string, or #f.
Set it with (set! (auth:realm self) value).
The authentication scheme name.
Its value is a string, or #f.
It is read only.
Call this on an auth to authenticate it.
Normally this will cause the auth’s message to be requeued with the new authentication info.
Passed: a <SoupAuth>.
Passed: a string.
the username provided by the user or client
Passed: a string.
the password provided by the user or client
Tests if self is able to authenticate by providing credentials to
the Auth.authenticate.
Passed: a <SoupAuth>.
Returned: a boolean.
#t if self is able to accept credentials.
Call this on an auth to cancel it.
You need to cancel an auth to complete an asynchronous authenticate
operation when no credentials are provided (Auth.authenticate is
not called). The Auth will be cancelled on dispose if it hasn’t
been authenticated.
Passed: a <SoupAuth>.
Returns the authority (host:port) that self is associated with.
Passed: a <SoupAuth>.
Returned: a string.
the authority
Generates an appropriate "Authorization" header for msg.
(The session will only call this if Auth.is_authenticated
returned #t.)
Passed: a <SoupAuth>.
Passed: a <SoupMessage>.
the <SoupMessage> to be authorized
Returned: a string.
the "Authorization" header, which must be freed.
Gets an opaque identifier for self.
The identifier can be used as a hash key or the like. Auth
objects from the same server with the same identifier refer to the same
authentication domain (eg, the URLs associated with them take the same
usernames and passwords).
Passed: a <SoupAuth>.
Returned: a string.
the identifier
Returns a list of paths on the server which self extends over.
(All subdirectories of these paths are also assumed to be part of self’s protection space, unless otherwise discovered not to be.)
Passed: a <SoupAuth>.
Passed: a <GUri>.
the URI of the request that self was generated in response to.
Returned: a list, each a string.
the list of paths, which can be freed with
Auth.free_protection_space.
Returns self’s realm.
This is an identifier that distinguishes separate authentication spaces on a given server, and may be some string that is meaningful to the user. (Although it is probably not localized.)
Passed: a <SoupAuth>.
Returned: a string.
the realm name
soup_auth_get_scheme_name: (attributes org.gtk.Method.get_property=scheme-name) Returns self’s scheme name. (Eg, "Basic", "Digest", or "NTLM")
Passed: a <SoupAuth>.
Returned: a string.
the scheme name
Tests if self has been given a username and password.
Passed: a <SoupAuth>.
Returned: a boolean.
#t if self has been given a username and password
Tests if self has been cancelled
Passed: a <SoupAuth>.
Returned: a boolean.
#t if self has been cancelled
Tests whether or not self is associated with a proxy server rather than an "origin" server.
Passed: a <SoupAuth>.
Returned: a boolean.
#t or #f
Tests if self is ready to make a request for msg with.
For most auths, this is equivalent to Auth.is_authenticated, but
for some auth types (eg, NTLM), the auth may be sendable (eg, as an
authentication request) even before it is authenticated.
Passed: a <SoupAuth>.
Passed: a <SoupMessage>.
Returned: a boolean.
#t if self is ready to make a request with.
Creates a new Auth of type type with the information from
msg and auth-header.
This is called by Session; you will normally not create auths
yourself.
Passed: a class, or a GType number.
the type of auth to create (a subtype of Auth)
Passed: a <SoupMessage>.
the <SoupMessage> the auth is being created for
Passed: a string.
the WWW-Authenticate/Proxy-Authenticate header
Returned: a <SoupAuth>, or #f.
the new Auth, or #f if it could not be created
Updates self with the information from msg and auth-header, possibly un-authenticating it.
As with Auth.new, this is normally only used by Session.
Passed: a <SoupAuth>.
Passed: a <SoupMessage>.
the <SoupMessage> self is being updated for
Passed: a string.
the WWW-Authenticate/Proxy-Authenticate header
Returned: a boolean.
#t if self is still a valid (but potentially
unauthenticated) Auth. #f if something about
auth-params could not be parsed or incorporated into self at
all.
Call this on an auth to authenticate it.
Normally this will cause the auth’s message to be requeued with the new authentication info.
To override it in a new class, give register-type #:vfuncs
`((authenticate . ,procedure)). The procedure is called as
(procedure self username password).
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Passed: a string.
the username provided by the user or client
Passed: a string.
the password provided by the user or client
Tests if self is able to authenticate by providing credentials to
the Auth.authenticate.
To override it in a new class, give register-type #:vfuncs
`((can-authenticate . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Returned: a boolean.
#t if self is able to accept credentials.
Generates an appropriate "Authorization" header for msg.
(The session will only call this if Auth.is_authenticated
returned #t.)
To override it in a new class, give register-type #:vfuncs
`((get-authorization . ,procedure)). The procedure is called as
(procedure self msg) ⇒ %return.
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Passed: a <SoupMessage>.
the <SoupMessage> to be authorized
Returned: a string.
the "Authorization" header, which must be freed.
Returns a list of paths on the server which self extends over.
(All subdirectories of these paths are also assumed to be part of self’s protection space, unless otherwise discovered not to be.)
To override it in a new class, give register-type #:vfuncs
`((get-protection-space . ,procedure)). The procedure is called as
(procedure self source-uri) ⇒ %return.
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Passed: a <GUri>.
the URI of the request that self was generated in response to.
Returned: a list, each a string.
the list of paths, which can be freed with
Auth.free_protection_space.
Tests if self has been given a username and password.
To override it in a new class, give register-type #:vfuncs
`((is-authenticated . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Returned: a boolean.
#t if self has been given a username and password
Tests if self is ready to make a request for msg with.
For most auths, this is equivalent to Auth.is_authenticated, but
for some auth types (eg, NTLM), the auth may be sendable (eg, as an
authentication request) even before it is authenticated.
To override it in a new class, give register-type #:vfuncs
`((is-ready . ,procedure)). The procedure is called as
(procedure self msg) ⇒ %return.
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Passed: a <SoupMessage>.
Returned: a boolean.
#t if self is ready to make a request with.
Updates self with the information from msg and auth-header, possibly un-authenticating it.
As with Auth.new, this is normally only used by Session.
To override it in a new class, give register-type #:vfuncs
`((update . ,procedure)). The procedure is called as (procedure
self msg auth-header) ⇒ %return.
Passed: the class whose implementation to call:
<SoupAuth>, or a class that derives from it, or its
GType number.
Passed: a <SoupAuth>.
Passed: a <SoupMessage>.
the <SoupMessage> self is being updated for
Passed: a hash table, each key a foreign pointer and each value a foreign pointer.
the WWW-Authenticate/Proxy-Authenticate header
Returned: a boolean.
#t if self is still a valid (but potentially
unauthenticated) Auth. #f if something about
auth-params could not be parsed or incorporated into self at
all.