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 kumpf 1.20 This class keeps the authentication information of a connection
|
54 kumpf 1.1 persistent until the connection is destroyed.
55 */
56 class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep : public Sharable
57 {
58 public:
59
|
60 kumpf 1.20 //ATTN: we should be using an enumeration for the authtype instead of a
61 //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 sushma.fernandes 1.25 void setConnectionAuthenticated(Boolean connectionAuthenticated);
|
72 kumpf 1.1
|
73 kumpf 1.20 String getAuthenticatedUser() const
74 {
|
75 kumpf 1.1 return _authUser;
|
76 kumpf 1.20 }
|
77 kumpf 1.1
78 void setAuthenticatedUser(const String& userName);
79
|
80 kumpf 1.20 String getAuthenticatedPassword() const
81 {
|
82 kumpf 1.7 return _authPassword;
|
83 kumpf 1.20 }
|
84 kumpf 1.7
85 void setAuthenticatedPassword(const String& password);
86
|
87 kumpf 1.26 String getLocalAuthFilePath() const
88 {
89 return _localAuthFilePath;
90 }
91
92 void setLocalAuthFilePath(const String& filePath);
93
|
94 sushma.fernandes 1.24 String getLocalAuthSecret() const
|
95 kumpf 1.20 {
|
96 sushma.fernandes 1.24 return _localAuthSecret;
|
97 kumpf 1.20 }
|
98 kumpf 1.1
|
99 sushma.fernandes 1.24 void setLocalAuthSecret(const String& secret);
|
100 kumpf 1.1
|
101 sushma.fernandes 1.25 Boolean isConnectionAuthenticated() const
|
102 kumpf 1.20 {
|
103 sushma.fernandes 1.25 return _connectionAuthenticated;
|
104 kumpf 1.20 }
|
105 kumpf 1.1
|
106 kumpf 1.20 String getAuthType() const
107 {
|
108 kumpf 1.1 return _authType;
|
109 kumpf 1.20 }
|
110 kumpf 1.1
111 void setAuthType(const String& authType);
112
|
113 sushma.fernandes 1.19 void setIpAddress(const String& ipAddress)
114 {
115 _ipAddress = ipAddress;
116 }
117
118 String getIpAddress()
119 {
120 return _ipAddress;
121 }
122
|
123 gerarda 1.4 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
|
124 kumpf 1.20 CIMKerberosSecurityAssociation* getSecurityAssociation() const
125 {
|
126 a.arora 1.9 return _securityAssoc.get();
|
127 gerarda 1.5 }
|
128 sushma.fernandes 1.19
|
129 gerarda 1.5 void setSecurityAssociation();
|
130 gerarda 1.4 #endif
131
|
132 sushma.fernandes 1.18 Array<SSLCertificateInfo*> getClientCertificateChain()
|
133 kumpf 1.11 {
|
134 sushma.fernandes 1.18 return _clientCertificate;
|
135 kumpf 1.11 }
136
|
137 kumpf 1.23 void setClientCertificateChain(
138 Array<SSLCertificateInfo*> clientCertificate);
|
139 h.sterling 1.14
|
140 marek 1.21 void setRemotePrivilegedUserAccessChecked()
141 {
142 _wasRemotePrivilegedUserAccessChecked = true;
143 }
|
144 kumpf 1.22
|
145 marek 1.21 Boolean getRemotePrivilegedUserAccessChecked()
146 {
147 return _wasRemotePrivilegedUserAccessChecked;
148 }
149
|
150 kumpf 1.1 private:
151
152 /** Constructors */
153 AuthenticationInfoRep();
154
155 AuthenticationInfoRep(const AuthenticationInfoRep& x);
156
157 AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x);
158
159 String _authUser;
|
160 kumpf 1.7 String _authPassword;
|
161 sushma.fernandes 1.24 String _localAuthSecret;
|
162 kumpf 1.26 String _localAuthFilePath;
|
163 kumpf 1.1 String _authType;
|
164 sushma.fernandes 1.25 Boolean _connectionAuthenticated;
|
165 sushma.fernandes 1.19 String _ipAddress;
|
166 gerarda 1.4 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
|
167 a.arora 1.9 AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101
|
168 gerarda 1.4 #endif
|
169 marek 1.21 Boolean _wasRemotePrivilegedUserAccessChecked;
|
170 h.sterling 1.10
|
171 sushma.fernandes 1.18 Array<SSLCertificateInfo*> _clientCertificate;
|
172 kumpf 1.1 };
173
174 PEGASUS_NAMESPACE_END
175
176 #endif /* Pegasus_AuthenticationInfoRep_h*/
|