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

  1 karl  1.17 //%2006////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1  //
  3 karl  1.13 // 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.8  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.13 // 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.15 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.17 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 kumpf 1.1  //
 14 kumpf 1.2  // Permission is hereby granted, free of charge, to any person obtaining a copy
 15            // 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            // 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            // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22            // 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            // 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            // 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 kumpf 1.1  //
 30            //==============================================================================
 31            //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_AuthenticationInfoRep_h
 35            #define Pegasus_AuthenticationInfoRep_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 h.sterling 1.16 #include <Pegasus/Common/ArrayInternal.h>
 39 kumpf      1.1  #include <Pegasus/Common/String.h>
 40                 #include <Pegasus/Common/Sharable.h>
 41 kumpf      1.3  #include <Pegasus/Common/Linkage.h>
 42 h.sterling 1.10 #include <Pegasus/Common/SSLContext.h>
 43 kumpf      1.1  
 44 gerarda    1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
 45 gerarda    1.6  #include <Pegasus/Common/CIMKerberosSecurityAssociation.h>
 46 gerarda    1.4  #endif
 47 kumpf      1.1  
 48                 PEGASUS_NAMESPACE_BEGIN
 49                 
 50                 class AuthenticationInfo;
 51                 
 52                 /**
 53                     This class keeps the authentication information of a connection 
 54                     persistent until the connection is destroyed.
 55                 */
 56                 class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep :  public Sharable
 57                 {
 58                 public:
 59                     enum AuthStatus { NEW_REQUEST, CHALLENGE_SENT, AUTHENTICATED };
 60                 
 61 h.sterling 1.12 	//ATTN: we should be using an enumeration for the authtype instead of a string.
 62                 	//In the AuthenticationManager, the authtype is set to Basic, Digest, etc
 63                 	//We also need to be able to check whether the type is SSL, so I'm adding a 
 64                 	//string here to make it less arbitrary.  PEP165
 65                 	static const String AUTH_TYPE_SSL;
 66                     
 67 kumpf      1.1      AuthenticationInfoRep(Boolean flag);
 68                 
 69                     ~AuthenticationInfoRep();
 70                 
 71                     AuthStatus getAuthStatus() const 
 72                     { 
 73                         return _authStatus;
 74                     } 
 75                 
 76                     void   setAuthStatus(AuthStatus status);
 77                 
 78                     String getAuthenticatedUser() const 
 79                     { 
 80                         return _authUser;
 81                     } 
 82                 
 83                     void   setAuthenticatedUser(const String& userName);
 84                 
 85 kumpf      1.7      String getAuthenticatedPassword() const 
 86                     { 
 87                         return _authPassword;
 88                     } 
 89                 
 90                     void   setAuthenticatedPassword(const String& password);
 91                 
 92 kumpf      1.1      String getAuthChallenge() const 
 93                     { 
 94                         return _authChallenge;
 95                     } 
 96                 
 97                     void   setAuthChallenge(const String& challenge);
 98                 
 99                     String getAuthSecret() const 
100                     { 
101                         return _authSecret;
102                     } 
103                 
104                     void   setAuthSecret(const String& secret);
105                 
106                     Boolean isPrivileged() const 
107                     { 
108                         return _privileged;
109                     } 
110                 
111                     void   setPrivileged(Boolean privileged);
112                 
113 kumpf      1.1      Boolean isAuthenticated() const 
114                     { 
115                         return (_authStatus == AUTHENTICATED) ? true : false;
116                     } 
117                 
118                     String getAuthType() const 
119                     { 
120                         return _authType;
121                     } 
122                 
123                     void   setAuthType(const String& authType);
124                 
125 gerarda    1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
126                     CIMKerberosSecurityAssociation* getSecurityAssociation() const 
127                     { 
128 a.arora    1.9          return _securityAssoc.get();
129 gerarda    1.5      }
130                  
131                     void setSecurityAssociation();
132 gerarda    1.4  #endif
133                 
134 sushma.fernandes 1.18     //PEP187
135                           Array<SSLCertificateInfo*> getClientCertificateChain()
136 kumpf            1.11     {
137 sushma.fernandes 1.18         return _clientCertificate;
138 kumpf            1.11     }
139                       
140 sushma.fernandes 1.18     //PEP187
141                           void setClientCertificateChain(Array<SSLCertificateInfo*> 
142                                                             clientCertificate);
143 h.sterling       1.14 
144 kumpf            1.1  private:
145                       
146                           /** Constructors  */
147                           AuthenticationInfoRep();
148                       
149                           AuthenticationInfoRep(const AuthenticationInfoRep& x);
150                       
151                           AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x);
152                       
153                           String  _authUser;
154 kumpf            1.7      String  _authPassword;
155 kumpf            1.1      String  _authChallenge;
156                           String  _authSecret;
157                           Boolean _privileged;
158                           String  _authType;
159                           AuthStatus _authStatus;
160 gerarda          1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
161 a.arora          1.9      AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101
162 gerarda          1.4  #endif
163 h.sterling       1.10 
164 sushma.fernandes 1.18     Array<SSLCertificateInfo*> _clientCertificate;
165 kumpf            1.1  };
166                       
167                       PEGASUS_NAMESPACE_END
168                       
169                       #endif   /* Pegasus_AuthenticationInfoRep_h*/

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2