(file) Return to AuthenticationManager.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Security / Authentication

  1 mike  1.2 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3 kumpf 1.5 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4 mike  1.2 // The Open Group, Tivoli Systems
  5           //
  6 kumpf 1.5 // 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:
 12           // 
 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.
 21 mike  1.2 //
 22           //==============================================================================
 23           //
 24           // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
 25           //
 26           // Modified By:
 27           //
 28           //%/////////////////////////////////////////////////////////////////////////////
 29           
 30           #ifndef Pegasus_AuthenticationManager_h
 31           #define Pegasus_AuthenticationManager_h
 32           
 33           #include <Pegasus/Common/Config.h>
 34 kumpf 1.4 
 35           #include "Authenticator.h"
 36 mike  1.2 #include "Linkage.h"
 37           
 38           
 39           PEGASUS_NAMESPACE_BEGIN
 40           
 41 kumpf 1.4 /** This class implements the HTTP authentication and Pegasus Local 
 42               authentication mecahnism. It provides methods to perform authentication
 43               and to generate authentication challenge headers.
 44 mike  1.2 */
 45           
 46           class PEGASUS_SECURITY_LINKAGE AuthenticationManager
 47           {
 48           public:
 49           
 50 kumpf 1.4     /**Constructor */
 51 mike  1.2     AuthenticationManager();
 52           
 53 kumpf 1.4     /**Destructor */
 54 mike  1.2     ~AuthenticationManager();
 55           
 56 kumpf 1.4     /** Authenticates the requests from HTTP connections.
 57                   @param authHeader String containing the Authorization header
 58                   @param authInfo Reference to AuthenticationInfo object that holds the
 59                   authentication information for the given connection.
 60                   @return true on successful authentication, false otherwise
 61               */
 62 mike  1.2     Boolean performHttpAuthentication(
 63 kumpf 1.3         const String& authHeader,
 64 mike  1.2         AuthenticationInfo* authInfo);
 65           
 66 kumpf 1.4     /** Authenticates the requests from Local connections.
 67                   @param authHeader String containing the Authorization header
 68                   @param authInfo Reference to AuthenticationInfo object that holds the
 69                   authentication information for the given connection.
 70                   @return true on successful authentication, false otherwise
 71               */
 72 mike  1.2     Boolean performPegasusAuthentication(
 73 kumpf 1.3         const String& authHeader,
 74 mike  1.2         AuthenticationInfo* authInfo);
 75           
 76 kumpf 1.4     /** Constructs the Pegasus Local authentication challenge header.
 77                   @param authHeader String containing the Authorization header
 78                   @param authInfo reference to AuthenticationInfo object that holds the
 79                   authentication information for the given connection.
 80                   @return String containing the authentication challenge
 81               */
 82 mike  1.2     String getPegasusAuthResponseHeader(
 83 kumpf 1.3         const String& authHeader,
 84 mike  1.2         AuthenticationInfo* authInfo);
 85           
 86 kumpf 1.4     /** Constructs the HTTP authentication challenge header.
 87                   @return String containing the authentication challenge
 88               */
 89 mike  1.2     String getHttpAuthResponseHeader();
 90           
 91           private:
 92           
 93 kumpf 1.4     Boolean _parseLocalAuthHeader(
 94 kumpf 1.3         const String& authHeader, 
 95                   String& authType, 
 96                   String& userName, 
 97                   String& cookie);
 98 mike  1.2 
 99 kumpf 1.4     Boolean _parseHttpAuthHeader(
100                   const String& authHeader, 
101                   String& authType, 
102                   String& cookie);
103 mike  1.2 
104               Authenticator* _getLocalAuthHandler();
105           
106               Authenticator* _getHttpAuthHandler();
107 kumpf 1.4 
108               Authenticator* _localAuthHandler;
109               Authenticator* _httpAuthHandler;
110               String         _httpAuthType;
111 mike  1.2 
112           };
113           
114           PEGASUS_NAMESPACE_END
115           
116           #endif /* Pegasus_AuthenticationManager_h */
117           

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2