Barracuda Application Server C/C++ Reference
NO
Authenticator.h
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 ****************************************************************************
11 * HEADER
12 *
13 * $Id: Authenticator.h 5813 2026-06-15 10:15:50Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2005-2008
16 *
17 * This software is copyrighted by and is the sole property of Real
18 * Time Logic LLC. All rights, title, ownership, or other interests in
19 * the software remain the property of Real Time Logic LLC. This
20 * software may only be used in accordance with the terms and
21 * conditions stipulated in the corresponding license agreement under
22 * which the software has been supplied. Any unauthorized use,
23 * duplication, transmission, distribution, or disclosure of this
24 * software is expressly forbidden.
25 *
26 * This Copyright notice may not be removed or modified without prior
27 * written consent of Real Time Logic LLC.
28 *
29 * Real Time Logic LLC. reserves the right to modify this software
30 * without notice.
31 *
32 * http://www.realtimelogic.com
33 ****************************************************************************
34 *
35 */
36
37#ifndef __Authenticator_h
38#define __Authenticator_h
39
40#include "BasicAuthenticator.h"
41#include "DigestAuthenticator.h"
42#include "FormAuthenticator.h"
43
44
58typedef struct Authenticator
59#ifdef __cplusplus
60 : public AuthenticatorIntf
61{
71 Authenticator(UserIntf* userDbIntf,
72 const char* realm,
73 LoginRespIntf* sendLogin);
74
75
79 void setLoginTracker(LoginTracker* tracker);
80
84
88
92#else
93 {
94 AuthenticatorIntf superClass; /*as if inherited*/
95#endif
96 BasicAuthenticator basicAuth;
97 DigestAuthenticator digestAuth;
98 FormAuthenticator formAuth;
99 int authpref;
101
102
103#ifdef __cplusplus
104extern "C" {
105#endif
106BA_API void Authenticator_constructor(Authenticator* o,
107 UserIntf* userDbIntf,
108 const char* realm,
109 LoginRespIntf* sendLogin);
110BA_API void Authenticator_destructor(Authenticator* o);
111#define Authenticator_setLoginTracker(o, loginTracker)\
112 BasicAuthenticator_setLoginTracker(&(o)->basicAuth, loginTracker),\
113 DigestAuthenticator_setLoginTracker(&(o)->digestAuth, loginTracker),\
114 FormAuthenticator_setLoginTracker(&(o)->formAuth, loginTracker)
115#define Authenticator_getBasicAuthenticator(o) (&(o)->basicAuth)
116#define Authenticator_getDigestAuthenticator(o) (&(o)->digestAuth)
117#define Authenticator_getFormAuthenticator(o) (&(o)->formAuth)
118#ifdef __cplusplus
119}
121 UserIntf* userDbIntf,
122 const char* realm,
123 LoginRespIntf* sendLogin) {
124 Authenticator_constructor(this, userDbIntf, realm, sendLogin);
125}
127 Authenticator_setLoginTracker(this, tracker);
128}
130 return Authenticator_getBasicAuthenticator(this);
131}
133 return Authenticator_getDigestAuthenticator(this);
134}
136 return Authenticator_getFormAuthenticator(this);
137}
138#endif
139 /* end of Authentication */
141
142
143#endif
BasicAuthenticator * getBasicAuthenticator()
Get the internal BasicAuthenticator.
Definition: Authenticator.h:129
FormAuthenticator * getFormAuthenticator()
Get the internal FormAuthenticator.
Definition: Authenticator.h:135
Authenticator(UserIntf *userDbIntf, const char *realm, LoginRespIntf *sendLogin)
Definition: Authenticator.h:120
void setLoginTracker(LoginTracker *tracker)
Prevent dictionary attacks.
Definition: Authenticator.h:126
DigestAuthenticator * getDigestAuthenticator()
Get the internal DigestAuthenticator.
Definition: Authenticator.h:132
Abstract interface class implemented by DigestAuthenticator, FormAuthenticator and DigestAuthenticato...
Definition: AuthenticatedUser.h:398
Combines HTTP Basic, HTTP Digest, and form-based authentication.
Definition: Authenticator.h:61
Implements HTTP Basic authentication.
Definition: BasicAuthenticator.h:54
Implements HTTP Digest authentication.
Definition: DigestAuthenticator.h:55
Implements browser-oriented form-based authentication.
Definition: FormAuthenticator.h:67
The LoginRespIntf is an abstract class, which must be implemented when using one of DigestAuthenticat...
Definition: AuthenticatedUser.h:463
The LoginTracker class is an optional security enhancement that can be installed in an instance of on...
Definition: AuthenticatedUser.h:809
User database interface used by the authentication classes.
Definition: AuthenticatedUser.h:177