1 //%2003////////////////////////////////////////////////////////////////////////
3 // 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 // IBM Corp.; EMC Corporation, The Open Group.
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 //==============================================================================
26 // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
30 //%/////////////////////////////////////////////////////////////////////////////
32 #ifndef Pegasus_LocalAuthenticationHandler_h
33 #define Pegasus_LocalAuthenticationHandler_h
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/String.h>
38 #include "LocalAuthenticator.h"
39 #include "Authenticator.h"
41 #include <Pegasus/Security/Authentication/Linkage.h>
43 PEGASUS_NAMESPACE_BEGIN
47 This class implements the AuthenticationHandler for Pegasus Local authentication.
48 It extends the Authenticator and provides the implementation.
51 class PEGASUS_SECURITY_LINKAGE LocalAuthenticationHandler : public Authenticator
56 LocalAuthenticationHandler();
59 ~LocalAuthenticationHandler();
61 /** Verify the authentication of the user passed in the authorization header.
62 @param authHeader String containing the Authorization header
63 @param authInfo Reference to AuthenticationInfo object
64 @return true on successful authentication, false otherwise
67 const String& authHeader,
68 AuthenticationInfo* authInfo);
70 /** Construct and return the Pegasus Local authentication challenge header
71 @param authType String containing the HTTP authentication type
72 @param userName String containing the user name
73 @param authInfo Reference to AuthenticationInfo object
74 @return A string containing the authentication challenge header.
76 String getAuthResponseHeader(
77 const String& authType = String::EMPTY,
78 const String& userName = String::EMPTY,
79 AuthenticationInfo* authInfo = 0);
83 LocalAuthenticator* _localAuthenticator;
88 #endif /* Pegasus_LocalAuthenticationHandler_h*/