AuthDomainGenericAuthCallback


Description:

[ CCode ( instance_pos = 3.9 ) ]
public delegate bool AuthDomainGenericAuthCallback (AuthDomain domain, ServerMessage msg, string username)

The prototype for a AuthDomain generic authentication callback.

The callback should look up the user's password, call [method@AuthDomain.check_password], and use the return value from that method as its own return value.

In general, for security reasons, it is preferable to use the auth-domain-specific auth callbacks (eg, [callback@AuthDomainBasicAuthCallback] and [callback@AuthDomainDigestAuthCallback]), because they don't require keeping a cleartext password database. Most users will use the same password for many different sites, meaning if any site with a cleartext password database is compromised, accounts on other servers might be compromised as well. For many of the cases where [class@Server] is used, this is not really relevant, but it may still be worth considering.

Parameters:

domain

a AuthDomain

msg

the ServerMessage being authenticated

username

the username from msg

user_data

the data passed to [method@AuthDomain.set_generic_auth_callback]

Returns:

true if msg is authenticated, false if not.


Namespace: Soup
Package: libsoup-3.0