Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
FormAuthenticator.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: FormAuthenticator.h 5978 2026-09-11 16:13:48Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2003 - 2017
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 __FormAuthenticator_h
40#define __FormAuthenticator_h
41
42#include <AuthenticatedUser.h>
43
44#ifndef __DOXYGEN__
45typedef struct
46{
47 AuthenticatedUser superClass; /*as if inherited*/
48 const char* errorMessagePage; /*Path to a user defined error page.*/
49 BaBool isFirstTime;
50} FormAuthUser;
51#endif
52
66typedef struct FormAuthenticator
67#ifdef __cplusplus
68: public AuthenticatorIntf
69{
85 UserIntf* userDbIntf, const char* realm, LoginRespIntf* sendLogin);
86
92 void setLoginTracker(LoginTracker* tracker);
93
100 void setSecure();
101
102#else
103{
104 AuthenticatorIntf superClass; /*as if inherited*/
105#endif
106 UserIntf* userDbIntf;
107 LoginTracker* tracker;
108 char* realm;
109 LoginRespIntf* sendLogin;
110 BaBool secure;
111 U8 aesKey[32];
113
114
115#ifdef __cplusplus
116extern "C" {
117#endif
126 UserIntf* userDbIntf,
127 const char* realm,
128 LoginRespIntf* login);
129
133#define FormAuthenticator_destructor(o) do { \
134 if((o)->realm) \
135 baFree((o)->realm); \
136 (o)->realm=0; \
137 } while(0)
138
143#define FormAuthenticator_setLoginTracker(o,loginTracker) \
144 (o)->tracker=loginTracker
145
150#define FormAuthenticator_setSecure(o) (o)->secure=TRUE
151
152#ifdef __cplusplus
153}
155 const char* realm,
156 LoginRespIntf* login) {
158 this, userDbIntf, realm, login);
159}
162}
165}
166#endif
167 /* end of Authentication */
169
170
171#endif
BA_API void FormAuthenticator_constructor(FormAuthenticator *o, UserIntf *userDbIntf, const char *realm, LoginRespIntf *login)
C form of FormAuthenticator::FormAuthenticator.
#define FormAuthenticator_setLoginTracker(o, loginTracker)
C form of FormAuthenticator::setLoginTracker.
Definition: FormAuthenticator.h:143
void setSecure()
Set the authenticator into secure mode and accept only SSL/TLS connections.
Definition: FormAuthenticator.h:163
#define FormAuthenticator_setSecure(o)
C form of FormAuthenticator::setSecure.
Definition: FormAuthenticator.h:150
void setLoginTracker(LoginTracker *tracker)
Configure login-attempt tracking.
Definition: FormAuthenticator.h:160
uint8_t U8
Unsigned 8-bit integer.
Definition: GenPrimT.h:89
U8 BaBool
Boolean stored in an unsigned byte; FALSE is zero and TRUE is one.
Definition: GenPrimT.h:118
Abstract base class implemented by BasicAuthUser, FormAuthUser and DigestAuthUser.
Definition: AuthenticatedUser.h:272
Abstract interface class implemented by DigestAuthenticator, FormAuthenticator and BasicAuthenticator...
Definition: AuthenticatedUser.h:425
Implements browser-oriented form-based authentication.
Definition: FormAuthenticator.h:69
FormAuthenticator()
Leave storage uninitialized; call FormAuthenticator_constructor before use.
Definition: FormAuthenticator.h:71
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