auth-client.h revision 325d17cdbb7a338f7c413788f5e8e42d2e80a7f8
#ifndef AUTH_CLIENT_H
#define AUTH_CLIENT_H
#include "net.h"
#include "auth-client-interface.h"
struct auth_client;
struct auth_client_request;
enum auth_request_flags {
AUTH_REQUEST_FLAG_SECURED = 0x01,
/* Skip penalty checks for this request */
AUTH_REQUEST_FLAG_NO_PENALTY = 0x04,
/* Support final SASL response */
};
enum auth_request_status {
AUTH_REQUEST_STATUS_FAIL = -1,
};
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 *session_id;
const char *cert_username;
enum auth_request_flags flags;
const char *initial_resp_base64;
};
enum auth_request_status status,
const char *data_base64,
/* Create new authentication client. */
struct auth_client *
bool debug);
const struct auth_mech_desc *
unsigned int *mech_count);
const struct auth_mech_desc *
/* Return current connection's identifiers. */
unsigned int *server_pid_r,
unsigned int *connect_uid_r);
/* Create a new authentication request. callback is called whenever something
happens for the request. */
struct auth_client_request *
const struct auth_request_info *request_info,
ATTR_NULL(4);
/* 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. */
unsigned int
/* Return cookie of the server that handled this request. */
/* Tell auth process to drop specified request from memory */
#endif