Barracuda Application Server C/C++ Reference
NO
AuthInfo Struct Reference

Detailed Description

An instance of the AuthInfo struct is created on the stack in the Barracuda authenticators and is used as a container object for sending information to the registered user callback methods.

#include <AuthenticatedUser.h>

Public Attributes

struct LoginTrackertracker
 The tracker object if any.
 
HttpCommandcmd
 The request/response container object.
 
const char * username
 The user name if the client sends login information.
 
const char * upwd
 The password provided by the user, if any.
 
AuthenticatedUseruser
 The authenticated user object if the user is authenticated.
 
AuthenticatedUserType type
 The AuthenticatedUser type. More...
 
AuthInfoCT ct
 The ct parameter can optionally be set by the UserIntf_GetPwd function. More...
 
void * userObj
 An object that can be set by the callbacks for exchanging information.
 
BaTime maxInactiveInterval
 This variable specifies the time, in seconds, between client requests before the user is automatically logged out. More...
 
int maxUsers
 Max number of concurrent logins for this user. More...
 
int loginAttempts
 Shows the number of login attempts if the LoginTracker is active. More...
 
BaBool denied
 Flag set if the user is denied access by the LoginTracker. More...
 
BaBool recycle
 Force another client to log out. More...
 
U8 password [100]
 Must be set by UserIntf_GetPwd if the user is found. More...
 

Member Data Documentation

◆ ct

AuthInfoCT AuthInfo::ct

The ct parameter can optionally be set by the UserIntf_GetPwd function.

Must be set to AuthInfoCT_HA1 if * AuthInfo::password is set to a HA1 hash or to AuthInfoCT_Valid if the callback verifies (compares) the password * AuthInfo::upwd with the stored password.

◆ denied

BaBool AuthInfo::denied

Flag set if the user is denied access by the LoginTracker.

See also
loginAttempts

◆ loginAttempts

int AuthInfo::loginAttempts

Shows the number of login attempts if the LoginTracker is active.

See also
denied

◆ maxInactiveInterval

BaTime AuthInfo::maxInactiveInterval

This variable specifies the time, in seconds, between client requests before the user is automatically logged out.

The default value for HttpSession is used if this value is zero. The default value can be changed in UserIntf_GetPwd. The authenticator calls method HttpSession::setMaxInactiveInterval if this variable has a non-zero value.

◆ maxUsers

int AuthInfo::maxUsers

Max number of concurrent logins for this user.

This value defaults to 1. The UserIntf_GetPwd can change this value.

◆ password

U8 AuthInfo::password[100]

Must be set by UserIntf_GetPwd if the user is found.

This variable is by default set to '\0' and should not be changed by UserIntf_GetPwd if the user is not found. The LoginRespIntf callback can from this variable detect if the username is not found or if the password is wrong. The LoginRespIntf callback can assume the password provided by the user was wrong if this variable is set.

Warning: max password length is 99 characters + '\0'

◆ recycle

BaBool AuthInfo::recycle

Force another client to log out.

A user is normally prevented from logging in if the number of connected clients is larger than 'maxUsers'. This flag can be set by the UserIntf_GetPwd to force one of the other clients to automatically log out.

◆ type

AuthenticatedUserType AuthInfo::type

The AuthenticatedUser type.

This is one of AuthenticatedUserType_Basic, AuthenticatedUserType_Digest, or AuthenticatedUserType_Form. You can use this type information if you need to upcast the "user" variable.

See also
AuthenticatedUser::getType