From: Art Cancro Date: Mon, 2 Jun 2008 18:07:15 +0000 (+0000) Subject: Began laying the framework for creating new users with OpenID X-Git-Tag: v7.86~2173 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=2df7976b5c2930d833ad1a6f69e0b0bdaeb283e3 Began laying the framework for creating new users with OpenID --- diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index 80e25679d..d0515618a 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -240,6 +240,17 @@ int getuserbyopenid(struct ctdluser *usbuf, char *claimed_id) +int openid_create_user_via_sri(struct ctdluser *usbuf, char *claimed_id, HashList *sri_keys) +{ + if (config.c_auth_mode != AUTHMODE_NATIVE) return(1); + if (config.c_disable_newu) return(2); + + /* FIXME do something */ + + return(99); +} + + /**************************************************************************/ /* */ /* Functions in this section handle OpenID protocol */ @@ -651,8 +662,17 @@ void cmd_oidf(char *argbuf) { cprintf("authenticate\n%s\n%s\n", usbuf.fullname, usbuf.password); } + /* + * New user whose OpenID is verified and Simple Registration Extension is in use? + */ + else if (openid_create_user_via_sri(&usbuf, oiddata->claimed_id, keys) == 0) { + cprintf("authenticate\n%s\n%s\n", usbuf.fullname, usbuf.password); + } + + /* FIXME right here we have to handle manual account creation */ + else { - cprintf("fail\n"); // FIXME do the login here!! + cprintf("fail\n"); } } }