A canonicalization plug-in provides support for alternate canonicalization of authentication and authorization names for both the client and server-side. The sasl_canonuser_plug_init() is used to load canonicalization plug-ins.
A canonicalization plug-in has the following requirements:
The canonicalized name must be copied to the output buffers.
The same input buffer can be used as an output buffer.
A canonicalization plug-in must function in cases where only authentication IDs or authorization IDs exist.
User canonicalization plug-ins must export a sasl_canonuser_init() function. The sasl_canonuser_init() function must return sasl_canonuser_plug_t to establish the necessary entry points. User canonicalization plug-ins must implement at least one of the canon_user_client() or canon_user_server() members of the sasl_canonuser_plug_t structure.