(file) Return to HTTPAuthenticatorDelegator.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Server

  1 karl  1.24 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.2  //
  3 karl  1.16 // 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.13 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.16 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.19 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.24 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.2  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 kumpf 1.9  // of this software and associated documentation files (the "Software"), to
 16            // deal in the Software without restriction, including without limitation the
 17            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18 mike  1.2  // sell copies of the Software, and to permit persons to whom the Software is
 19            // furnished to do so, subject to the following conditions:
 20            // 
 21 kumpf 1.9  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.2  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24 kumpf 1.9  // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27 mike  1.2  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29            //
 30            //==============================================================================
 31            //
 32            // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
 33            //
 34            // Modified By:
 35 david.dillard 1.18 //              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
 36                    //              Heather Sterling, IBM (hsterl@us.ibm.com) for PEP#187
 37                    //              David Dillard, VERITAS Software Corp.
 38                    //                  (david.dillard@veriats.com)
 39 j.alex        1.22 //              John Alex, IBM (johnalex@us.ibm.com) - Bug#2290
 40 mike          1.2  //
 41                    //%/////////////////////////////////////////////////////////////////////////////
 42                    
 43                    #ifndef Pegasus_HTTPAuthenticatorDelegator_h
 44                    #define Pegasus_HTTPAuthenticatorDelegator_h
 45                    
 46                    #include <Pegasus/Common/Config.h>
 47 mday          1.4  #include <Pegasus/Common/MessageQueueService.h>
 48 mike          1.2  #include <Pegasus/Common/HTTPAcceptor.h>
 49                    #include <Pegasus/Common/HTTPConnection.h>
 50                    #include <Pegasus/Common/HTTPMessage.h>
 51 a.arora       1.15 #include <Pegasus/Common/AutoPtr.h>
 52 mike          1.2  #include <Pegasus/Security/Authentication/AuthenticationManager.h>
 53 kumpf         1.10 #include <Pegasus/Server/Linkage.h>
 54 mike          1.2  
 55 h.sterling    1.17 #include <Pegasus/Repository/CIMRepository.h>
 56                    
 57 mike          1.2  PEGASUS_NAMESPACE_BEGIN
 58                    
 59                    /**
 60 mday          1.5     This class parses the HTTP header in the HTTPMessage passed to it and
 61                       performs authentication based on the authentication specified in the
 62                       configuration. It sends the challenge for unauthorized requests and
 63                       validates the response.
 64 mike          1.2  
 65                    */
 66                    
 67 mday          1.8  class PEGASUS_SERVER_LINKAGE HTTPAuthenticatorDelegator : public MessageQueueService
 68 mike          1.2  {
 69 mday          1.5     public:
 70 mike          1.2  
 71 mday          1.8        typedef MessageQueueService Base;
 72 mday          1.3    
 73                    
 74 mday          1.5        /** Constructor. */
 75                          HTTPAuthenticatorDelegator(
 76                    	 Uint32 operationMessageQueueId,
 77 h.sterling    1.17 	 Uint32 exportMessageQueueId,
 78                    	 CIMRepository* repository);
 79 mike          1.2  
 80 mday          1.5        /** Destructor. */
 81                          ~HTTPAuthenticatorDelegator();
 82 mike          1.2  
 83 kumpf         1.12       /**
 84                              This method is overridden here to force the message to be handled
 85                              by the same thread that enqueues it.  See Bugzilla 641 for details.
 86                           */
 87 kumpf         1.20       virtual void enqueue(Message* message);
 88 kumpf         1.12 
 89 mday          1.5        virtual void handleEnqueue(Message *);
 90                          virtual void handleEnqueue();
 91 mike          1.2  
 92 mday          1.5        void handleHTTPMessage(HTTPMessage* httpMessage, Boolean & deleteMessage);
 93 mike          1.2  
 94 mday          1.5     private:
 95 mike          1.2  
 96 mday          1.5        void _sendResponse( 
 97 j.alex        1.22          Uint32 queueId, 
 98 mike          1.23          Buffer& message,
 99 j.alex        1.22          Boolean closeConnect); 
100 mike          1.2  
101 gerarda       1.11 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
102                          void _sendSuccess( 
103 j.alex        1.22          Uint32 queueId, 
104                             const String& authResponse,
105                             Boolean closeConnect); 
106 gerarda       1.11 #endif 
107                    
108 mday          1.5        void _sendChallenge(
109 j.alex        1.22          Uint32 queueId,
110                             const String& authResponse,
111                             Boolean closeConnect); 
112 mike          1.2  
113 kumpf         1.14       void _sendHttpError(
114                             Uint32 queueId,
115                             const String& status,
116                             const String& cimError = String::EMPTY,
117 j.alex        1.22          const String& pegasusError = String::EMPTY,
118                             Boolean closeConnect = false); 
119 mike          1.2  
120 mday          1.5        Uint32 _operationMessageQueueId;
121 mike          1.2  
122 mday          1.5        Uint32 _exportMessageQueueId;
123 mike          1.2  
124 a.arora       1.15       AutoPtr<AuthenticationManager> _authenticationManager; //PEP101
125 h.sterling    1.17 
126                    private:
127 sushma.fernandes 1.21 
128 j.alex           1.22       CIMRepository* _repository;
129 mike             1.2  };
130                       
131                       PEGASUS_NAMESPACE_END
132                       
133                       #endif /* Pegasus_HTTPAuthenticatorDelegator_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2