27 #include <sys/types.h>
44 Credential credential,
50 User user =
new(User, NULL);
52 user->username =
CRED_PWD(credential).user;
53 user->nusername = &
CRED_PWD(credential).nuser;
54 search =
indexUuid(user, this->user_namespace);
56 auth_module =
authenticate(this->auth, credential, search);
58 if (0 != auth_module) {
59 char * user_serialized;
60 size_t nuser_serialized;
64 switch (credential->type) {
68 (
char *)(search->uuid).value,
69 sizeof((search->uuid).value),
73 if (NULL != user_serialized) {
76 (
unsigned char *)user_serialized,
89 session->user->username = NULL;
90 delete(session->user);
91 session->user =
new(User,
100 (
unsigned char **)&user_serialized,
109 (
char *)(search->uuid).value,
110 sizeof((search->uuid).value),
116 session->user->auth_type = auth_module;
StoragePutResult storagePut(Storage, char *, size_t, char *, size_t)
#define CSTRA(val)
Const STRing Argument.
int authenticate(void *, Credential, Uuid)
void storageGet(Storage, char *, size_t, char **, size_t *)
void serialize(void *, unsigned char **, size_t *)
int applicationLogin(Application this, Credential credential, Session session)
Uuid indexUuid(void *, Uuid)
void unserialize(void *, const unsigned char *, size_t)