auth-client.h revision 6ef7e31619edfaa17ed044b45861d106a86191ef
#ifndef __AUTH_CLIENT_H
#define __AUTH_CLIENT_H
#include "network.h"
#include "../auth/auth-client-interface.h"
struct auth_client;
struct auth_request;
enum auth_request_flags {
AUTH_REQUEST_FLAG_SECURED = 0x01,
};
struct auth_mech_desc {
char *name;
enum mech_security_flags flags;
};
struct auth_connect_id {
unsigned int server_pid;
unsigned int connect_uid;
};
struct auth_request_info {
const char *mech;
const char *service;
const char *cert_username;
enum auth_request_flags flags;
const char *initial_resp_base64;
};
const char *data_base64,
/* Create new authentication client. */
void *context);
const struct auth_mech_desc *
unsigned int *mech_count);
const struct auth_mech_desc *
/* Reserve connection for specific mechanism. The id can be given to
auth_client_request_new() to force it to use the same connection, or fail.
This is currently useful only for APOP authentication. Returns TRUE if
successfull. */
const char *mech,
struct auth_connect_id *id_r);
/* Create a new authentication request. callback is called whenever something
happens for the request. id can be NULL. */
struct auth_request *
const struct auth_request_info *request_info,
const char **error_r);
/* Continue authentication. Call when
reply->result == AUTH_CLIENT_REQUEST_CONTINUE */
const char *data_base64);
/* Abort ongoing authentication request. */
/* Return ID of this request. */
/* Return the PID of the server that handled this request. */
/* -- Using lib-auth with external I/O loop -- */
typedef void *input_func_remove_t(void *io);
const char *socket_paths,
/* Call every few seconds. */
#endif