1.6 <SoupAuthDomainDigest>

Class: <SoupAuthDomainDigest>

It derives from <SoupAuthDomain>.

Server-side "Digest" authentication.

AuthDomainDigest handles the server side of HTTP "Digest" authentication.

Properties

Property: auth-domain-digest:auth-callback self

The AuthDomainDigestAuthCallback.

Its value is a foreign pointer (or, to set it, a bytevector).

Set it with (set! (auth-domain-digest:auth-callback self) value).

Property: auth-domain-digest:auth-data self

The data to pass to the AuthDomainDigestAuthCallback.

Its value is a foreign pointer (or, to set it, a bytevector).

Set it with (set! (auth-domain-digest:auth-data self) value).

Procedures

Procedure: auth-domain-digest:encode-password username realm password ⇒ %return

Encodes the username/realm/password triplet for Digest authentication.

That is, it returns a stringified MD5 hash of username, realm, and password concatenated together. This is the form that is needed as the return value of AuthDomainDigest’s auth handler.

For security reasons, you should store the encoded hash, rather than storing the cleartext password itself and calling this method only when you need to verify it. This way, if your server is compromised, the attackers will not gain access to cleartext passwords which might also be usable at other sites. (Note also that the encoded password returned by this method is identical to the encoded password stored in an Apache .htdigest file.)

username

Passed: a string.

a username

realm

Passed: a string.

an auth realm name

password

Passed: a string.

the password for username in realm

%return

Returned: a string.

the encoded password

Method: auth-domain-digest:set-auth-callback self callback
Method: set-auth-callback self callback

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

For each request containing authorization, self 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 AuthDomainDigest:auth-callback and AuthDomainDigest:auth-data properties, which can also be used to set the callback at construct time.

self

Passed: a <SoupAuthDomainDigest>.

the domain

callback

Passed: a procedure.

the callback

See SoupAuthDomainDigestAuthCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data to pass to auth-callback

dnotify

Not passed: guile-gi supplies it.

destroy notifier to free user-data when self is destroyed

See GDestroyNotify for how it is called.