jabberd14 1.6.2
Functions
authreg.cc File Reference

handle authentication or new-user registration requests More...

#include "jsm.h"
#include <time.h>

Functions

void _js_authreg_auth (jpacket p)
void _js_authreg_register (jpacket p)
void js_authreg (void *arg)

Detailed Description

handle authentication or new-user registration requests


Function Documentation

void _js_authreg_auth ( jpacket  p)

Handle authentication requests (delegation from inside js_authreg())

This function does only prepare the packet p to be sent back, but js_authreg() is responsible for sending the packet back after calling this function.

Parameters:
pthe packet that contains the authentication request

References jpacket_struct::aux1, e_AUTH, jpacket_struct::iq, JPACKET__GET, jpacket_subtype(), js_mapi_call(), js_user(), jutil_error_xmpp(), jutil_tofrom(), log_debug2, LOGT_AUTH, NS_AUTH, udata_struct::ref, jpacket_struct::to, jpacket_struct::x, xmlnode_insert_tag_ns(), xmlnode_put_attrib_ns(), XTERROR_AUTH, and ZONE.

Referenced by js_authreg().

void _js_authreg_register ( jpacket  p)
void js_authreg ( void *  arg)

Handle authentication or new-user registration requests

If jsm is not configured to let an external component handle authentication and registration of new users, it will let this function handle these both jobs

Parameters:
argthe packet containing the authentication or registration request

References _js_authreg_auth(), _js_authreg_register(), jpacket_struct::aux1, deliver(), dpacket_new(), xmppd::jabberid::has_node(), xmppd::jabberid::has_resource(), jsmi_struct::i, jpacket_struct::iq, JPACKET__GET, jpacket_subtype(), jutil_error_xmpp(), NS_AUTH, NS_REGISTER, NS_SERVER, NSCHECK, jpacket_struct::to, jpacket_struct::x, xmlnode_get_attrib_ns(), xmlnode_hide_attrib_ns(), xmlnode_put_attrib_ns(), xmlnode_wrap_ns(), and XTERROR_NOTACCEPTABLE.

Referenced by _js_routed_auth_packet().