#ifndef __IAUTHENTICATION_SCHEME_H__
#define __IAUTHENTICATION_SCHEME_H__

#include "htaccess_parser.h"

#include "http.h"

#include "mecha.h"

typedef struct IAuthenticationScheme_s IAuthenticationScheme;

typedef void (*IAuthenticationSchemeDestroy) (IAuthenticationScheme *instance);

enum AuthenticateResult_e
{
    AuthenticateResultReject,
    AuthenticateResultAccept
};

typedef enum AuthenticateResult_e AuthenticateResult;

struct IAuthenticationScheme_s
{
    bool (*read_config) (IAuthenticationScheme *instance, HtaccessParser *config);

    AuthenticateResult (*auth_user) (IAuthenticationScheme *instance, 
            httpTtrans *trans, const char *authData);

    IAuthenticationSchemeDestroy destroy;
};


#endif
