https://bugs.winehq.org/show_bug.cgi?id=50545
--- Comment #26 from Hans Leidekker hans@meelstraat.net --- (In reply to Damjan Jovanovic from comment #24)
(In reply to Hans Leidekker from comment #23)
This may also depend on the authentication scheme.
How are we supposed to know the authentication scheme?
We don't know because we're letting the client and server negotiate the scheme. We could iterate over a known list instead.
I did some testing and it turns out that both GSSAPI and GSS-SPNEGO call SASL_CB_USER, but successful authentication depends on this callback returning an error. DIGEST-MD5 also calls this one, followed by SASL_CB_AUTHNAME and SASL_CB_PASS.
SASL_CB_USER appears to be used for supplying a proxy username, which is not supported by all schemes.