1 karl 1.13 //%2004////////////////////////////////////////////////////////////////////////
|
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.7 // 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 kumpf 1.1 //
|
10 kumpf 1.3 // Permission is hereby granted, free of charge, to any person obtaining a copy
11 // of this software and associated documentation files (the "Software"), to
12 // deal in the Software without restriction, including without limitation the
13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14 // sell copies of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
16 //
17 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
18 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
25 kumpf 1.1 //
26 //==============================================================================
27 //
28 // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
29 //
|
30 kumpf 1.6 // Modified By: Jair Santos, Hewlett-Packard Company (jair.santos@hp.com)
|
31 a.arora 1.8 // Amit K Arora, IBM (amita@in.ibm.com) for PEP-101
|
32 h.sterling 1.10 // Heather Sterling, IBM (hsterl@us.ibm.com)
|
33 kumpf 1.1 //
34 //%/////////////////////////////////////////////////////////////////////////////
35
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/Tracer.h>
38 #include "AuthenticationInfoRep.h"
|
39 h.sterling 1.10 #include <Pegasus/Common/SSLContext.h>
|
40 kumpf 1.1
41 PEGASUS_USING_STD;
42
43 PEGASUS_NAMESPACE_BEGIN
44
|
45 h.sterling 1.12 const String AuthenticationInfoRep::AUTH_TYPE_SSL = "SSL";
|
46 kumpf 1.1
47 AuthenticationInfoRep::AuthenticationInfoRep(Boolean flag)
48 :
49 _authUser(String::EMPTY),
|
50 kumpf 1.6 _authPassword(String::EMPTY),
|
51 kumpf 1.2 _authChallenge(String::EMPTY),
|
52 kumpf 1.1 _authSecret(String::EMPTY),
|
53 kumpf 1.2 _privileged(false),
54 _authType(String::EMPTY),
|
55 h.sterling 1.10 _authStatus(NEW_REQUEST),
|
56 kumpf 1.11 _exportConnection(false)
|
57 kumpf 1.1 {
58 PEG_METHOD_ENTER(
59 TRC_AUTHENTICATION, "AuthenticationInfoRep::AuthenticationInfoRep");
60
61 PEG_METHOD_EXIT();
62 }
63
64
65 AuthenticationInfoRep::~AuthenticationInfoRep()
66 {
67 PEG_METHOD_ENTER(
68 TRC_AUTHENTICATION, "AuthenticationInfoRep::~AuthenticationInfoRep");
|
69 gerarda 1.4
|
70 kumpf 1.1 PEG_METHOD_EXIT();
71 }
72
73 void AuthenticationInfoRep::setAuthStatus(AuthStatus status)
74 {
75 PEG_METHOD_ENTER(
76 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthStatus");
77
78 _authStatus = status;
79
80 PEG_METHOD_EXIT();
81 }
82
83 void AuthenticationInfoRep::setAuthenticatedUser(const String& userName)
84 {
85 PEG_METHOD_ENTER(
86 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthenticatedUser");
87
88 _authUser = userName;
|
89 kumpf 1.6
90 PEG_METHOD_EXIT();
91 }
92
93 void AuthenticationInfoRep::setAuthenticatedPassword(const String& password)
94 {
95 PEG_METHOD_ENTER(
96 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthenticatedPassword");
97
98 _authPassword = password;
|
99 kumpf 1.1
100 PEG_METHOD_EXIT();
101 }
102
103 void AuthenticationInfoRep::setAuthChallenge(const String& challenge)
104 {
105 PEG_METHOD_ENTER(
106 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthChallenge");
107
108 _authChallenge = challenge;
109
110 PEG_METHOD_EXIT();
111 }
112
113 void AuthenticationInfoRep::setAuthSecret(const String& secret)
114 {
115 PEG_METHOD_ENTER(
116 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthSecret");
117
118 _authSecret = secret;
119
120 kumpf 1.1 PEG_METHOD_EXIT();
121 }
122
123 void AuthenticationInfoRep::setPrivileged(Boolean privileged)
124 {
125 PEG_METHOD_ENTER(
126 TRC_AUTHENTICATION, "AuthenticationInfoRep::setPrivileged");
127
128 _privileged = privileged;
129
130 PEG_METHOD_EXIT();
131 }
132
133 void AuthenticationInfoRep::setAuthType(const String& authType)
134 {
135 PEG_METHOD_ENTER(
136 TRC_AUTHENTICATION, "AuthenticationInfoRep::setAuthType");
137
138 _authType = authType;
139
140 PEG_METHOD_EXIT();
141 kumpf 1.1 }
|
142 gerarda 1.5
143 #ifdef PEGASUS_KERBEROS_AUTHENTICATION
144 void AuthenticationInfoRep::setSecurityAssociation()
145 {
146 PEG_METHOD_ENTER(
147 TRC_AUTHENTICATION, "AuthenticationInfoRep::setSecurityAssociation");
148
|
149 a.arora 1.8 if ( !_securityAssoc.get() )
|
150 gerarda 1.5 {
|
151 a.arora 1.9 _securityAssoc.reset(new CIMKerberosSecurityAssociation);
|
152 gerarda 1.5 }
153
154 PEG_METHOD_EXIT();
155 }
156 #endif
157
|
158 kumpf 1.11 void AuthenticationInfoRep::setExportConnection(Boolean exportConnection)
159 {
160 PEG_METHOD_ENTER(TRC_AUTHENTICATION,
161 "AuthenticationInfoRep::setExportConnection");
162
163 _exportConnection = exportConnection;
164
165 PEG_METHOD_EXIT();
166 }
167
|
168 h.sterling 1.14 //PEP187
169 void AuthenticationInfoRep::setClientCertificate(SSLCertificateInfo* clientCertificate)
170 {
171 PEG_METHOD_ENTER(TRC_AUTHENTICATION,
172 "AuthenticationInfoRep::setClientCertificate");
173
174 _clientCertificate = clientCertificate;
175
176 PEG_METHOD_EXIT();
177 }
178
179
|
180 kumpf 1.1 PEGASUS_NAMESPACE_END
|