(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            // Author:  Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
 33            //
 34 kumpf 1.7  // Modified By: Jair Santos, Hewlett-Packard Company(jair.santos@hp.com)
 35 h.sterling 1.10 //              Heather Sterling, IBM (hsterl@us.ibm.com)
 36 kumpf      1.1  //
 37                 //%/////////////////////////////////////////////////////////////////////////////
 38                 
 39                 #ifndef Pegasus_AuthenticationInfoRep_h
 40                 #define Pegasus_AuthenticationInfoRep_h
 41                 
 42                 #include <Pegasus/Common/Config.h>
 43 h.sterling 1.16 #include <Pegasus/Common/ArrayInternal.h>
 44 kumpf      1.1  #include <Pegasus/Common/String.h>
 45                 #include <Pegasus/Common/Sharable.h>
 46 kumpf      1.3  #include <Pegasus/Common/Linkage.h>
 47 h.sterling 1.10 #include <Pegasus/Common/SSLContext.h>
 48 kumpf      1.1  
 49 gerarda    1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
 50 gerarda    1.6  #include <Pegasus/Common/CIMKerberosSecurityAssociation.h>
 51 gerarda    1.4  #endif
 52 kumpf      1.1  
 53                 PEGASUS_NAMESPACE_BEGIN
 54                 
 55                 class AuthenticationInfo;
 56                 
 57                 /**
 58                     This class keeps the authentication information of a connection 
 59                     persistent until the connection is destroyed.
 60                 */
 61                 class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep :  public Sharable
 62                 {
 63                 public:
 64                     enum AuthStatus { NEW_REQUEST, CHALLENGE_SENT, AUTHENTICATED };
 65                 
 66 h.sterling 1.12 	//ATTN: we should be using an enumeration for the authtype instead of a string.
 67                 	//In the AuthenticationManager, the authtype is set to Basic, Digest, etc
 68                 	//We also need to be able to check whether the type is SSL, so I'm adding a 
 69                 	//string here to make it less arbitrary.  PEP165
 70                 	static const String AUTH_TYPE_SSL;
 71                     
 72 kumpf      1.1      AuthenticationInfoRep(Boolean flag);
 73                 
 74                     ~AuthenticationInfoRep();
 75                 
 76                     AuthStatus getAuthStatus() const 
 77                     { 
 78                         return _authStatus;
 79                     } 
 80                 
 81                     void   setAuthStatus(AuthStatus status);
 82                 
 83                     String getAuthenticatedUser() const 
 84                     { 
 85                         return _authUser;
 86                     } 
 87                 
 88                     void   setAuthenticatedUser(const String& userName);
 89                 
 90 kumpf      1.7      String getAuthenticatedPassword() const 
 91                     { 
 92                         return _authPassword;
 93                     } 
 94                 
 95                     void   setAuthenticatedPassword(const String& password);
 96                 
 97 kumpf      1.1      String getAuthChallenge() const 
 98                     { 
 99                         return _authChallenge;
100                     } 
101                 
102                     void   setAuthChallenge(const String& challenge);
103                 
104                     String getAuthSecret() const 
105                     { 
106                         return _authSecret;
107                     } 
108                 
109                     void   setAuthSecret(const String& secret);
110                 
111                     Boolean isPrivileged() const 
112                     { 
113                         return _privileged;
114                     } 
115                 
116                     void   setPrivileged(Boolean privileged);
117                 
118 kumpf      1.1      Boolean isAuthenticated() const 
119                     { 
120                         return (_authStatus == AUTHENTICATED) ? true : false;
121                     } 
122                 
123                     String getAuthType() const 
124                     { 
125                         return _authType;
126                     } 
127                 
128                     void   setAuthType(const String& authType);
129                 
130 gerarda    1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
131                     CIMKerberosSecurityAssociation* getSecurityAssociation() const 
132                     { 
133 a.arora    1.9          return _securityAssoc.get();
134 gerarda    1.5      }
135                  
136                     void setSecurityAssociation();
137 gerarda    1.4  #endif
138                 
139 kumpf      1.11     Boolean isExportConnection() const
140                     {
141                         return _exportConnection;
142                     }
143                 
144                     void setExportConnection(Boolean exportConnection);
145                 
146 h.sterling 1.14 	//PEP187
147 h.sterling 1.16     Array<SSLCertificateInfo*> getClientCertificateChain()
148 h.sterling 1.14 	{
149                         return _clientCertificate;
150                 	}
151                 
152                 	//PEP187
153 h.sterling 1.16 	void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate);
154 h.sterling 1.14 
155 kumpf      1.1  private:
156                 
157                     /** Constructors  */
158                     AuthenticationInfoRep();
159                 
160                     AuthenticationInfoRep(const AuthenticationInfoRep& x);
161                 
162                     AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x);
163                 
164                     String  _authUser;
165 kumpf      1.7      String  _authPassword;
166 kumpf      1.1      String  _authChallenge;
167                     String  _authSecret;
168                     Boolean _privileged;
169                     String  _authType;
170                     AuthStatus _authStatus;
171 gerarda    1.4  #ifdef PEGASUS_KERBEROS_AUTHENTICATION
172 a.arora    1.9      AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101
173 gerarda    1.4  #endif
174 h.sterling 1.10 
175 kumpf      1.11     Boolean _exportConnection;
176 h.sterling 1.16 	Array<SSLCertificateInfo*> _clientCertificate;
177 kumpf      1.1  };
178                 
179                 PEGASUS_NAMESPACE_END
180                 
181                 #endif   /* Pegasus_AuthenticationInfoRep_h*/

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2