diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-30 00:28:47 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-11-30 00:28:47 +0100 |
| commit | 103acd7c2e1467401f0795930be9140dc5ed47ff (patch) | |
| tree | 957b5c058bbfefed30776af83566e85337315273 /database | |
| parent | bd0257855f980b9460b19cf9ac0dbc6a8b971a85 (diff) | |
| download | eurephia-103acd7c2e1467401f0795930be9140dc5ed47ff.tar.gz eurephia-103acd7c2e1467401f0795930be9140dc5ed47ff.tar.xz eurephia-103acd7c2e1467401f0795930be9140dc5ed47ff.zip | |
Improved admin authentication model
Remove the session creation logic from the database layer, as that
should be located in the application instead. Database layer should do
as strictly as possible database things.
Diffstat (limited to 'database')
| -rw-r--r-- | database/eurephiadb.c | 2 | ||||
| -rw-r--r-- | database/eurephiadb_driver.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/database/eurephiadb.c b/database/eurephiadb.c index ed17195..3652f41 100644 --- a/database/eurephiadb.c +++ b/database/eurephiadb.c @@ -93,6 +93,8 @@ int eDBlink_init(eurephiaCTX *ctx, const char *dbl, const int minver) "to upgrade eurphia to take advantage of newer features in the eurephiaDB driver."); case 2: eDBadminAuth = eGetSym(ctx, ctx->eurephia_driver, "eDBadminAuth"); + eDBadminValidateSession = eGetSym(ctx, ctx->eurephia_driver, "eDBadminValidateSession"); + eDBadminRegisterLogin = eGetSym(ctx, ctx->eurephia_driver, "eDBadminRegisterLogin"); eDBgetUserList = eGetSym(ctx, ctx->eurephia_driver, "eDBgetUserList"); eDBgetUserInfo = eGetSym(ctx, ctx->eurephia_driver, "eDBgetUserInfo"); diff --git a/database/eurephiadb_driver.h b/database/eurephiadb_driver.h index 18666c9..9488a63 100644 --- a/database/eurephiadb_driver.h +++ b/database/eurephiadb_driver.h @@ -86,7 +86,9 @@ int (*eDBstore_session_value) (eurephiaCTX *ctx, eurephiaSESSION *skey, int mode const char *key, const char *val); /* API version 2 functions */ -eurephiaSESSION *(*eDBadminAuth) (eurephiaCTX *ctx, const char intf, const char *uname, const char *pwd); +int (*eDBadminAuth) (eurephiaCTX *ctx, const char *uname, const char *pwd); +int (*eDBadminValidateSession) (eurephiaCTX *ctx, const char *sesskey); +int (*eDBadminRegisterLogin) (eurephiaCTX *ctx, eurephiaSESSION *session); eurephiaUSERLIST *(*eDBgetUserList) (eurephiaCTX *ctx, const int sortkey); eurephiaUSERINFO *(*eDBgetUserInfo) (eurephiaCTX *ctx, eurephiaUSERINFO *searchkey); |
