1
0
mirror of https://github.com/falk-werner/webfused synced 2024-09-28 22:00:44 +00:00
falk-werner_webfused/src/webfused/auth/authenticator.h

50 lines
889 B
C
Raw Normal View History

2020-03-16 20:50:31 +00:00
#ifndef WFD_AUTH_AUTHENTICATOR_H
#define WFD_AUTH_AUTHENTICATOR_H
2020-07-05 09:19:00 +00:00
#include "webfuse/authenticate.h"
2020-03-16 20:50:31 +00:00
#ifdef __cplusplus
extern "C"
{
#endif
typedef void
wfd_authenticator_dispose_fn(
void * data);
2020-03-17 15:49:17 +00:00
typedef char const *
wfd_authenticator_get_type_fn(
void * data);
2020-03-16 20:50:31 +00:00
struct wfd_authenticator_vtable
{
wfd_authenticator_dispose_fn * dispose;
wf_authenticate_fn * authenticate;
2020-03-17 15:49:17 +00:00
wfd_authenticator_get_type_fn * get_type;
2020-03-16 20:50:31 +00:00
};
struct wfd_authenticator
{
struct wfd_authenticator_vtable const * vtable;
void * data;
};
extern void
wfd_authenticator_dispose(
struct wfd_authenticator authenticator);
extern bool
wfd_authenticator_authenticate(
struct wfd_authenticator authenticator,
struct wf_credentials * credentials);
2020-03-16 20:50:31 +00:00
2020-03-17 15:49:17 +00:00
extern char const *
wfd_authenticator_get_type(
struct wfd_authenticator authenticator);
2020-03-16 20:50:31 +00:00
#ifdef __cplusplus
}
#endif
#endif