Barracuda Application Server C/C++ Reference
NO
BasicAuthenticator.h
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 ****************************************************************************
11 * HEADER
12 *
13 * $Id: BasicAuthenticator.h 5813 2026-06-15 10:15:50Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2003-2013
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 __BasicAuthenticator_h
38#define __BasicAuthenticator_h
39
40#include <AuthenticatedUser.h>
41
51typedef struct BasicAuthenticator
52#ifdef __cplusplus
53: public AuthenticatorIntf
54{
62 BasicAuthenticator(UserIntf* userDbIntf,
63 const char* realm,
64 LoginRespIntf* sendLogin);
65
69 void setLoginTracker(LoginTracker* tracker);
70
77 static void setAutHeader(const char* realm, HttpResponse* response);
78
79#else
80{
81 AuthenticatorIntf superClass; /*as if inherited*/
82#endif
83 UserIntf* userDbIntf;
84 LoginTracker* tracker;
85 char* realm;
86 LoginRespIntf* sendLogin;
87 BaBool filterMsDomain; /* If remove MS domain name prefix */
89
90
91#ifdef __cplusplus
92extern "C" {
93#endif
94BA_API void BasicAuthenticator_constructor(
96 UserIntf* userDbIntf,
97 const char* realm,
98 LoginRespIntf* sendLogin);
99BA_API void BasicAuthenticator_destructor(BasicAuthenticator* o);
100#define BasicAuthenticator_setLoginTracker(o,loginTracker) \
101 (o)->tracker=loginTracker
102#define BasicAuthenticator_setFilterMsDomain(o, state) \
103 (o)->filterMsDomain=state
104BA_API void BasicAuthenticator_setAutHeader(
105 const char* realm,HttpResponse* resp);
106#ifdef __cplusplus
107}
108inline BasicAuthenticator::BasicAuthenticator(UserIntf* userDbIntf,
109 const char* realm,
110 LoginRespIntf* sendLogin) {
111 BasicAuthenticator_constructor(
112 this,userDbIntf,realm,sendLogin); }
114 BasicAuthenticator_setLoginTracker(this, tracker); }
116 const char* realm, HttpResponse* resp) {
117 BasicAuthenticator_setAutHeader(realm,resp); }
118#endif
119 /* end of Authentication */
121
122#endif
static void setAutHeader(const char *realm, HttpResponse *response)
Sets an HTTP Basic authentication challenge and status code.
Definition: BasicAuthenticator.h:115
void setLoginTracker(LoginTracker *tracker)
Prevent dictionary attacks.
Definition: BasicAuthenticator.h:113
Abstract interface class implemented by DigestAuthenticator, FormAuthenticator and DigestAuthenticato...
Definition: AuthenticatedUser.h:398
Implements HTTP Basic authentication.
Definition: BasicAuthenticator.h:54
This object is used when sending response messages back to the client.
Definition: HttpServer.h:1186
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