|
Server 0.0.1
HTTP/REST server implementation
|
00001 00023 #ifndef __AUTH_CREDENTIAL_H__ 00024 #define __AUTH_CREDENTIAL_H__ 00025 00026 #include <sys/types.h> 00027 00028 #include "class.h" 00029 00030 #define CRED_PWD(c) (((c)->cred).pwd) 00031 00032 typedef enum e_CredentialType { 00033 CRED_PASSWORD = 0 00034 } CredentialType; 00035 00036 00037 CLASS(Credential) { 00038 CredentialType type; 00039 00040 union { 00041 00042 struct { 00043 char * user; 00044 size_t nuser; 00045 char * pass; 00046 size_t npass; 00047 } pwd; 00048 00049 } cred; 00050 }; 00051 00052 #endif // __AUTH_CREDENTIAL_H__ 00053 00054 // vim: set ts=4 sw=4: