Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
Authenticator.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 ****************************************************************************
11 * HEADER
12 *
13 * $Id: Authenticator.h 5978 2026-09-11 16:13:48Z 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
39#ifndef __Authenticator_h
40#define __Authenticator_h
41
42#include "BasicAuthenticator.h"
43#include "DigestAuthenticator.h"
44#include "FormAuthenticator.h"
45
46
60typedef struct Authenticator
61#ifdef __cplusplus
62 : public AuthenticatorIntf
63{
76 Authenticator(UserIntf* userDbIntf,
77 const char* realm,
78 LoginRespIntf* sendLogin);
79
80
87 void setLoginTracker(LoginTracker* tracker);
88
94
100
106#else
107 {
108 AuthenticatorIntf superClass; /*as if inherited*/
109#endif
110 BasicAuthenticator basicAuth;
111 DigestAuthenticator digestAuth;
112 FormAuthenticator formAuth;
113 int authpref;
115
116
117#ifdef __cplusplus
118extern "C" {
119#endif
127 UserIntf* userDbIntf,
128 const char* realm,
129 LoginRespIntf* sendLogin);
140#define Authenticator_setLoginTracker(o, loginTracker)\
141 BasicAuthenticator_setLoginTracker(&(o)->basicAuth, loginTracker),\
142 DigestAuthenticator_setLoginTracker(&(o)->digestAuth, loginTracker),\
143 FormAuthenticator_setLoginTracker(&(o)->formAuth, loginTracker)
147#define Authenticator_getBasicAuthenticator(o) (&(o)->basicAuth)
151#define Authenticator_getDigestAuthenticator(o) (&(o)->digestAuth)
155#define Authenticator_getFormAuthenticator(o) (&(o)->formAuth)
156#ifdef __cplusplus
157}
159 UserIntf* userDbIntf,
160 const char* realm,
161 LoginRespIntf* sendLogin) {
162 Authenticator_constructor(this, userDbIntf, realm, sendLogin);
163}
165 Authenticator_setLoginTracker(this, tracker);
166}
169}
172}
175}
176#endif
177 /* end of Authentication */
179
180
181#endif
BasicAuthenticator * getBasicAuthenticator()
Access the embedded Basic authenticator.
Definition: Authenticator.h:167
#define Authenticator_getBasicAuthenticator(o)
Access the embedded Basic authenticator.
Definition: Authenticator.h:147
#define Authenticator_setLoginTracker(o, loginTracker)
C form of Authenticator::setLoginTracker.
Definition: Authenticator.h:140
BA_API void Authenticator_destructor(Authenticator *o)
Release authenticator-owned realm storage after detaching all users.
#define Authenticator_getFormAuthenticator(o)
Access the embedded Form authenticator.
Definition: Authenticator.h:155
#define Authenticator_getDigestAuthenticator(o)
Access the embedded Digest authenticator.
Definition: Authenticator.h:151
FormAuthenticator * getFormAuthenticator()
Access the embedded Form authenticator.
Definition: Authenticator.h:173
Authenticator(UserIntf *userDbIntf, const char *realm, LoginRespIntf *sendLogin)
Construct an authenticator using application-provided user lookup.
Definition: Authenticator.h:158
void setLoginTracker(LoginTracker *tracker)
Configure login-attempt tracking.
Definition: Authenticator.h:164
BA_API void Authenticator_constructor(Authenticator *o, UserIntf *userDbIntf, const char *realm, LoginRespIntf *sendLogin)
C form of Authenticator::Authenticator.
DigestAuthenticator * getDigestAuthenticator()
Access the embedded Digest authenticator.
Definition: Authenticator.h:170
Abstract interface class implemented by DigestAuthenticator, FormAuthenticator and BasicAuthenticator...
Definition: AuthenticatedUser.h:425
Combines HTTP Basic, HTTP Digest, and form-based authentication.
Definition: Authenticator.h:63
Implements HTTP Basic authentication.
Definition: BasicAuthenticator.h:56
Implements HTTP Digest authentication.
Definition: DigestAuthenticator.h:57
Implements browser-oriented form-based authentication.
Definition: FormAuthenticator.h:69
The LoginRespIntf is an abstract class, which must be implemented when using one of DigestAuthenticat...
Definition: AuthenticatedUser.h:504
The LoginTracker class is an optional security enhancement that can be installed in an instance of on...
Definition: AuthenticatedUser.h:891
User database interface used by the authentication classes.
Definition: AuthenticatedUser.h:195