1 mike 1.2 //%/////////////////////////////////////////////////////////////////////////////
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 mike 1.2 // DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Bapu Patil, Hewlett-Packard Company (bapu_patil@hp.com)
27 //
28 // Modified By:
29 // Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
30 //
31 //%/////////////////////////////////////////////////////////////////////////////
32
33 #ifndef Pegasus_Authenticator_h
34 #define Pegasus_Authenticator_h
35
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/String.h>
38 #include <Pegasus/Common/AuthenticationInfo.h>
39 #include "Linkage.h"
40
41
42 PEGASUS_NAMESPACE_BEGIN
43 mike 1.2
44 /**
45 An authentication interface that the authentication handler will implement.
46 */
47
48 class PEGASUS_SECURITY_LINKAGE Authenticator
49 {
50 public:
51
52 /** Constructors */
53 Authenticator() { };
54
55 /** Destructor */
56 virtual ~Authenticator() { };
57
58 /**
59 Authenticate the request
60 */
61 virtual Boolean authenticate(String authHeader, AuthenticationInfo* authInfo) = 0;
62
63 /**
64 mike 1.2 Construct and return the authentication response header
65 */
66 virtual String getAuthResponseHeader(
67 String requestHeader,
68 AuthenticationInfo* authInfo = 0) = 0;
69
70 };
71
72 PEGASUS_NAMESPACE_END
73
74 #endif /* Pegasus_Authenticator_h*/
|