auth-client.h revision 05817ffe09295892e1aa5c4a7f91d060e249563c
#ifndef AUTH_CLIENT_H
#define AUTH_CLIENT_H
#include "network.h"
#include "auth-client-interface.h"
struct auth_client;
struct auth_client_request;
enum auth_request_flags {
AUTH_REQUEST_FLAG_SECURED = 0x01,
};
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 *cert_username;
enum auth_request_flags flags;
unsigned int local_port, remote_port;
const char *initial_resp_base64;
};
enum auth_request_status status,
const char *data_base64,
/* Create new authentication client. */
struct auth_client *
bool debug);
void *context);
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,
/* 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