-
Notifications
You must be signed in to change notification settings - Fork 2
/
PancakeAuthentication.h
45 lines (30 loc) · 1.34 KB
/
PancakeAuthentication.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _PANCAKE_AUTHENTICATION_H
#define _PANCAKE_AUTHENTICATION_H
#include "../Pancake.h"
UByte PancakeAuthenticationInitialize();
UByte PancakeAuthenticationShutdown();
/* Forward declaration */
typedef struct _PancakeAuthenticationConfiguration PancakeAuthenticationConfiguration;
typedef void (*PancakeAuthenticationBackendConfigurationHandler)(PancakeAuthenticationConfiguration *config);
typedef UByte (*PancakeAuthenticationHandler)(PancakeAuthenticationConfiguration *config, void *data);
typedef struct _PancakeAuthenticationBackend {
String name;
PancakeAuthenticationBackendConfigurationHandler onConfiguration;
PancakeAuthenticationHandler authenticate;
UT_hash_handle hh;
} PancakeAuthenticationBackend;
typedef struct _PancakeAuthenticationConfiguration {
String name;
PancakeAuthenticationBackend *backend;
void *backendData;
UT_hash_handle hh;
} PancakeAuthenticationConfiguration;
typedef struct _PancakeAuthenticationUserPassword {
String user;
String password;
} PancakeAuthenticationUserPassword;
extern PancakeAuthenticationConfiguration *PancakeAuthenticationActiveConfiguration;
extern PancakeModule PancakeAuthenticationModule;
PANCAKE_API void PancakeAuthenticationRegisterBackend(PancakeAuthenticationBackend *backend);
PANCAKE_API UByte PancakeAuthenticate(PancakeAuthenticationConfiguration *config, void *data);
#endif