1 karl 1.8 //%2004////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.8 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.7 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.8 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 mike 1.2 //
|
10 kumpf 1.5 // Permission is hereby granted, free of charge, to any person obtaining a copy
11 // of this software and associated documentation files (the "Software"), to
12 // deal in the Software without restriction, including without limitation the
13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14 // sell copies of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
16 //
17 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
18 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
25 mike 1.2 //
26 //==============================================================================
27 //
28 // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
29 //
30 // Modified By:
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_LocalAuthenticationHandler_h
35 #define Pegasus_LocalAuthenticationHandler_h
36
37 #include <Pegasus/Common/Config.h>
38 #include <Pegasus/Common/String.h>
|
39 kumpf 1.4
40 #include "LocalAuthenticator.h"
|
41 mike 1.2 #include "Authenticator.h"
|
42 chuck 1.6
43 #include <Pegasus/Security/Authentication/Linkage.h>
|
44 mike 1.2
45 PEGASUS_NAMESPACE_BEGIN
46
47
48 /**
|
49 kumpf 1.4 This class implements the AuthenticationHandler for Pegasus Local authentication.
50 It extends the Authenticator and provides the implementation.
|
51 mike 1.2 */
52
53 class PEGASUS_SECURITY_LINKAGE LocalAuthenticationHandler : public Authenticator
54 {
55 public:
56
57 /** Constructors */
58 LocalAuthenticationHandler();
59
60 /** Destructor */
61 ~LocalAuthenticationHandler();
62
|
63 kumpf 1.4 /** Verify the authentication of the user passed in the authorization header.
64 @param authHeader String containing the Authorization header
65 @param authInfo Reference to AuthenticationInfo object
66 @return true on successful authentication, false otherwise
|
67 mike 1.2 */
|
68 kumpf 1.3 Boolean authenticate(
69 const String& authHeader,
70 AuthenticationInfo* authInfo);
|
71 mike 1.2
|
72 kumpf 1.4 /** Construct and return the Pegasus Local authentication challenge header
73 @param authType String containing the HTTP authentication type
74 @param userName String containing the user name
75 @param authInfo Reference to AuthenticationInfo object
76 @return A string containing the authentication challenge header.
|
77 kumpf 1.3 */
78 String getAuthResponseHeader(
|
79 kumpf 1.4 const String& authType = String::EMPTY,
80 const String& userName = String::EMPTY,
81 AuthenticationInfo* authInfo = 0);
|
82 mike 1.2
83 private:
84
85 LocalAuthenticator* _localAuthenticator;
86 };
87
88 PEGASUS_NAMESPACE_END
89
90 #endif /* Pegasus_LocalAuthenticationHandler_h*/
|