auth.c File Reference

#include "nsd.h"

Functions

int Ns_AuthorizeRequest (char *server, char *method, char *url, char *user, char *passwd, char *peer)
void Ns_SetRequestAuthorizeProc (char *server, Ns_RequestAuthorizeProc *proc)
int NsTclRequestAuthorizeObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
int Ns_AuthorizeUser (char *user, char *passwd)
void Ns_SetUserAuthorizeProc (Ns_UserAuthorizeProc *procPtr)

Function Documentation

int Ns_AuthorizeRequest ( char *  server,
char *  method,
char *  url,
char *  user,
char *  passwd,
char *  peer 
)

----------------------------------------------------------------------

Ns_AuthorizeRequest --

Check for proper HTTP authorization of a request.

Results: User supplied routine is expected to return NS_OK if authorization is allowed, NS_UNAUTHORIZED if a correct username/passwd could allow authorization, NS_FORBIDDEN if no username/passwd would ever allow access, or NS_ERROR on error.

Side effects: Depends on user supplied routine.

----------------------------------------------------------------------

int Ns_AuthorizeUser ( char *  user,
char *  passwd 
)

----------------------------------------------------------------------

Ns_AuthorizeUser --

Verify that a user's password matches his name. passwd is the unencrypted password.

Results: NS_OK or NS_ERROR; if none registered, NS_ERROR.

Side effects: Depends on the supplied routine.

----------------------------------------------------------------------

void Ns_SetRequestAuthorizeProc ( char *  server,
Ns_RequestAuthorizeProc *  proc 
)

----------------------------------------------------------------------

Ns_SetRequestAuthorizeProc --

Set the proc to call when authorizing requests.

Results: None.

Side effects: None.

----------------------------------------------------------------------

void Ns_SetUserAuthorizeProc ( Ns_UserAuthorizeProc *  procPtr  ) 

----------------------------------------------------------------------

Ns_SetUserAuthorizeProc --

Set the proc to call when authorizing users.

Results: None.

Side effects: None.

----------------------------------------------------------------------

int NsTclRequestAuthorizeObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *CONST  objv[] 
)

----------------------------------------------------------------------

NsTclRequestAuthorizeObjCmd --

Implements ns_requestauthorize as obj command.

Results: Tcl result.

Side effects: See docs.

----------------------------------------------------------------------


Generated on Tue Sep 4 19:58:55 2007 by  doxygen 1.5.1