1 kumpf 1.1.2.1 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a
7 // copy of this software and associated documentation files (the "Software"),
8 // to deal in the Software without restriction, including without limitation
9 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 // and/or sell copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in
14 // all copies of substantial portions of this software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 kumpf 1.1.2.1 // DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
27 //
28 // Modified By:
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_BasicAuthenticationHandler_h
33 #define Pegasus_BasicAuthenticationHandler_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/String.h>
37 #include "Linkage.h"
38 #include "Authenticator.h"
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 /**
43 kumpf 1.1.2.1 Implements the AuthenticationHandler for Basic authentication
44 */
45
46 class PEGASUS_SECURITY_LINKAGE BasicAuthenticationHandler : public Authenticator
47 {
48 public:
49
50 /** Constructors */
51 BasicAuthenticationHandler();
52
53 /** Destructor */
54 ~BasicAuthenticationHandler();
55
56 /**
57 Authenticate the request
58 */
59 Boolean authenticate(String authHeader, String authInfo);
60
61 /**
62 Construct and return the authentication response header
63 */
64 kumpf 1.1.2.1 String getAuthResponseHeader(String realm, String& challenge);
65
66 private:
67 //ATTN: Include this when basic authentication is added
68 //BasicAuthenticator* _basicAuthenticator;
69 };
70
71 PEGASUS_NAMESPACE_END
72
73 #endif /* Pegasus_BasicAuthenticationHandler_h*/
|