ESAPI-C 1.0
The OWASP Enterprise Security API for C

user.h File Reference

User module header. More...

#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  User_t
 An application user account, including information required to enforce security on users properly. More...

Defines

#define NAME_MAX   64

Typedefs

typedef struct User_t user

Functions

int lock_user (user *u)
 Get the user id for the given user.
int unlock_user (user *u)
 Unlocks the user.

Detailed Description

User module header.

Represents an application user or user account. There is quite a lot of information that an application must store for each user in order to enforce security properly. There are also many rules that govern authentication and identity management.

A user account can be in one of several states. When first created, a User should be disabled, not expired, and unlocked. To start using the account, an administrator should enable the account. The account can be locked for a number of reasons, most commonly because they have failed login for too many times. Finally, the account can expire after the expiration date has been reached. The User must be enabled, not expired, and unlocked in order to pass authentication.

Since:
January 30, 2011

Definition in file user.h.


Function Documentation

int lock_user ( user u)

Get the user id for the given user.

Returns:
A long integer representing a unique identifier for the given user, or -1 if the user is NULL. Set the current user of this application to the given user. Clears the given user. Locks the user.

Definition at line 97 of file user.c.

 All Data Structures Files Functions Variables Typedefs Defines