Barracuda Application Server C/C++ Reference
NO
DavAuth.h
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 ****************************************************************************
11 * HEADER
12 *
13 * $Id: DavAuth.h 4915 2021-12-01 18:26:55Z wini $
14 *
15 * COPYRIGHT: Real Time Logic, 2006
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 __DavAuth_h
38#define __DavAuth_h
39
40#include "BasicAuthenticator.h"
41#include "DigestAuthenticator.h"
42
43
59typedef struct DavAuth
60#ifdef __cplusplus
61 : public AuthenticatorIntf
62{
68 DavAuth(UserIntf* userDbIntf, const char* realm);
69
73
77
81 void setLoginTracker(LoginTracker* tracker);
82#else
83 {
84 AuthenticatorIntf superClass; /*as if inherited*/
85#endif
86 LoginRespIntf sendLogin;
87 BasicAuthenticator basicAuth;
88 DigestAuthenticator digestAuth;
90
91
92#ifdef __cplusplus
93extern "C" {
94#endif
95BA_API void DavAuth_constructor(DavAuth* o,
96 UserIntf* userDbIntf,
97 const char* realm);
98
99BA_API void DavAuth_destructor(DavAuth* o);
100#define DavAuth_getBasicAuth(o) (&(o)->basicAuth)
101#define DavAuth_getDigestAuth(o) (&(o)->digestAuth)
102#define DavAuth_setLoginTracker(o, loginTracker) do{\
103 BasicAuthenticator_setLoginTracker(&(o)->basicAuth, loginTracker);\
104 DigestAuthenticator_setLoginTracker(&(o)->digestAuth, loginTracker);\
105 }while(0)
106#ifdef __cplusplus
107}
108inline DavAuth::DavAuth(UserIntf* userDbIntf,const char* realm) {
109 DavAuth_constructor(this, userDbIntf, realm);
110}
112 return DavAuth_getBasicAuth(this);
113}
115 return DavAuth_getDigestAuth(this);
116}
118 DavAuth_setLoginTracker(this, tracker);
119}
120#endif
121 /* end of Authentication */
123
124
125#endif
DigestAuthenticator * getDigestAuth()
Get the internal DigestAuthenticator.
Definition: DavAuth.h:114
BasicAuthenticator * getBasicAuth()
Get the internal BasicAuthenticator.
Definition: DavAuth.h:111
DavAuth(UserIntf *userDbIntf, const char *realm)
Create a DavAuth instance.
Definition: DavAuth.h:108
void setLoginTracker(LoginTracker *tracker)
Prevent dictionary attacks.
Definition: DavAuth.h:117
Abstract interface class implemented by DigestAuthenticator, FormAuthenticator and DigestAuthenticato...
Definition: AuthenticatedUser.h:395
Implements Basic Authentication.
Definition: BasicAuthenticator.h:54
This class implements HTTP Basic and HTTP Digest authentication.
Definition: DavAuth.h:62
Implements Digest Authentication.
Definition: DigestAuthenticator.h:55
The LoginRespIntf is an abstract class, which must be implemented when using one of DigestAuthenticat...
Definition: AuthenticatedUser.h:460
The LoginTracker class is an optional security enhancement that can be installed in an instance of on...
Definition: AuthenticatedUser.h:812
Interface class used by the Authentication classes.
Definition: AuthenticatedUser.h:174