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