Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Authentication

Communicates with the AUS. More...

Functions

int macs_logout (const void *ctxp, const char *skey)
 Remove an AUS session.

char * macs_login (const void *ctxp, const char *method, const char *login, const char *pwd, const char *ip, const char *port, int timeout)
 Create an AUS session.

char * macs_auth_sess (const void *ctxp, const char *skey, const char *ip, const char *port)
 Ask an AUS if this skey is logged in.


Detailed Description

Communicates with the AUS.


Function Documentation

int macs_logout const void *    ctxp,
const char *    skey
 

Remove an AUS session.

Parameters:
ctxp  An opaque _macs_ctx pointer from macs_init.
skey  The session key to log out
Returns:
1 on success, 0 on failure
Removes a session from the AUS, logging it out of macs.

char* macs_login const void *    ctxp,
const char *    method,
const char *    login,
const char *    pwd,
const char *    ip,
const char *    port,
int    timeout
 

Create an AUS session.

Parameters:
ctxp  An opaque _macs_ctx pointer from macs_init.
method  The login method to verify with. NULL == "internal"
login  The username to verify
pwd  The password/token to verify
ip  The ip address the user is using
port  The port the user is connecting from
timeout  The idle time before the session is closed. -1 for default, 0 for no session.
Returns:
session key, or NULL on failure
Creates a session in the AUS, which can be verified with macs_auth_sess().
Examples:
sample.c.

char* macs_auth_sess const void *    ctxp,
const char *    skey,
const char *    ip,
const char *    port
 

Ask an AUS if this skey is logged in.

Parameters:
ctxp  An opaque _macs_ctx pointer from macs_init.
skey  The skey to validate
ip  The user's connecting IP address in "1.2.3.4" format
port  The user's connecting port
Returns:
The macs uid of the session's holder, or NULL on failure. The returned string should be free()d by caller.
Queries an AUS as to the validity of a session key/ip address combination.
Examples:
sample.c.


Generated on Tue Oct 8 22:15:53 2002 for MACS Client C API by doxygen1.2.16