module Client:sig..end
type session
val create_session : mech:Netsys_sasl.sasl_mechanism ->
user:string ->
authz:string ->
creds:Netsys_sasl.credentials ->
params:(string * string * bool) list -> unit -> sessionThe new client session authenticate as user and authorizes as
authz (empty string if not applicable). The credentials are
creds.
user and authz must be encoded in UTF-8.
The parameters are given as list (name,value,critical).
Critical parameters must be interpreted by the mechanism, and
unknown critical parameters must be rejected by a Failure
exception. Non-critical parameters are ignored if they are unknown
to the mechanism.
val state : session -> Netsys_sasl_types.client_statereport the state (whether expecting challenges or responding)
val configure_channel_binding : session ->
Netsys_sasl_types.cb -> sessionConfigure GS2-style channel binding
val restart : session -> sessionRestart the session for another authentication round. The session
must be in state `OK.
val process_challenge : session -> string -> sessionProcess the challenge from the server. The state must be `Wait.
As an exception, this function can also be called for the initial
challenge from the server, even if the state is `Emit.
val emit_response : session -> session * stringEmit a new response. The state must be `Emit.
val channel_binding : session -> Netsys_sasl_types.cbWhether the client suggests or demands channel binding
val user_name : session -> stringThe user name
val authz_name : session -> stringThe authorization name
val stash_session : session -> stringSerializes the session as string
val resume_session : Netsys_sasl.sasl_mechanism -> string -> sessionUnserializes the session
val session_id : session -> string optionOptionally return a string that can be used to identify the client session. Not all mechanisms support this.
val prop : session -> string -> stringGet a mechanism-specific property of the session. E.g. this can be the "realm" sent by the server.
val gssapi_props : session -> Netsys_gssapi.client_propsGet the GSSAPI props, or raise Not_found