version 1.35, 2007/05/25 18:35:13
|
version 1.42, 2012/12/13 14:38:54
|
|
|
//%2006//////////////////////////////////////////////////////////////////////// |
//%LICENSE//////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Licensed to The Open Group (TOG) under one or more contributor license |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
// this work for additional information regarding copyright ownership. |
// IBM Corp.; EMC Corporation, The Open Group. |
// Each contributor licenses this file to you under the OpenPegasus Open |
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
// Source License; you may not use this file except in compliance with the |
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// License. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
|
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy |
// Permission is hereby granted, free of charge, to any person obtaining a |
// of this software and associated documentation files (the "Software"), to |
// copy of this software and associated documentation files (the "Software"), |
// deal in the Software without restriction, including without limitation the |
// to deal in the Software without restriction, including without limitation |
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
// sell copies of the Software, and to permit persons to whom the Software is |
// and/or sell copies of the Software, and to permit persons to whom the |
// furnished to do so, subject to the following conditions: |
// Software is furnished to do so, subject to the following conditions: |
// | // |
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
// The above copyright notice and this permission notice shall be included |
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
// in all copies or substantial portions of the Software. |
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
|
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
|
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
// | // |
//============================================================================== |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
|
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
// |
|
////////////////////////////////////////////////////////////////////////// |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
/** Constructor - Instantiates a AuthenticationInfo object. | /** Constructor - Instantiates a AuthenticationInfo object. |
@param flag - used only to distinguish from the default constructor. | @param flag - used only to distinguish from the default constructor. |
*/ | */ |
AuthenticationInfo(Boolean flag) |
AuthenticationInfo(Boolean) |
{ | { |
PEG_METHOD_ENTER( | PEG_METHOD_ENTER( |
TRC_AUTHENTICATION, "AuthenticationInfo::AuthenticationInfo"); | TRC_AUTHENTICATION, "AuthenticationInfo::AuthenticationInfo"); |
| |
_rep = new AuthenticationInfoRep(flag); |
_rep = new AuthenticationInfoRep(); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
|
|
*/ | */ |
void setConnectionAuthenticated(Boolean status) | void setConnectionAuthenticated(Boolean status) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setConnectionAuthenticated(status); | _rep->setConnectionAuthenticated(status); |
} | } |
| |
|
|
*/ | */ |
String getAuthenticatedUser() const | String getAuthenticatedUser() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getAuthenticatedUser(); | return _rep->getAuthenticatedUser(); |
} | } |
| |
|
|
*/ | */ |
void setAuthenticatedUser(const String& userName) | void setAuthenticatedUser(const String& userName) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setAuthenticatedUser(userName); | _rep->setAuthenticatedUser(userName); |
} | } |
| |
|
#ifdef PEGASUS_OS_ZOS |
|
|
|
/** The connection user is for z/OS only. |
|
On z/OS Unix Local Domain Sockets and sockets |
|
protected by AT-TLS are able to get the user ID of |
|
the connected user. |
|
This information is needed for later authentication |
|
steps. |
|
*/ |
|
|
|
/** Get the connection user name |
|
@return the connection user name |
|
*/ |
|
String getConnectionUser() const |
|
{ |
|
CheckRep(_rep); |
|
return _rep->getConnectionUser(); |
|
} |
|
|
|
/** Sets the connection user name |
|
@param userName - string containing the user name |
|
provided by the connection |
|
*/ |
|
void setConnectionUser(const String& userName) |
|
{ |
|
CheckRep(_rep); |
|
_rep->setConnectionUser(userName); |
|
} |
|
|
|
#endif |
|
|
/** Get the previously authenticated password | /** Get the previously authenticated password |
@return the authenticated password | @return the authenticated password |
*/ | */ |
String getAuthenticatedPassword() const | String getAuthenticatedPassword() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getAuthenticatedPassword(); | return _rep->getAuthenticatedPassword(); |
} | } |
| |
|
|
*/ | */ |
void setAuthenticatedPassword(const String& password) | void setAuthenticatedPassword(const String& password) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setAuthenticatedPassword(password); | _rep->setAuthenticatedPassword(password); |
} | } |
| |
|
|
*/ | */ |
String getLocalAuthFilePath() const | String getLocalAuthFilePath() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getLocalAuthFilePath(); | return _rep->getLocalAuthFilePath(); |
} | } |
| |
|
|
*/ | */ |
void setLocalAuthFilePath(const String& filePath) | void setLocalAuthFilePath(const String& filePath) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setLocalAuthFilePath(filePath); | _rep->setLocalAuthFilePath(filePath); |
} | } |
| |
|
|
*/ | */ |
String getLocalAuthSecret() const | String getLocalAuthSecret() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getLocalAuthSecret(); | return _rep->getLocalAuthSecret(); |
} | } |
| |
|
|
*/ | */ |
void setLocalAuthSecret(const String& secret) | void setLocalAuthSecret(const String& secret) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setLocalAuthSecret(secret); | _rep->setLocalAuthSecret(secret); |
} | } |
| |
|
|
*/ | */ |
Boolean isConnectionAuthenticated() const | Boolean isConnectionAuthenticated() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->isConnectionAuthenticated(); | return _rep->isConnectionAuthenticated(); |
} | } |
| |
|
|
*/ | */ |
void setAuthType(const String& authType) | void setAuthType(const String& authType) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setAuthType(authType); | _rep->setAuthType(authType); |
} | } |
| |
|
|
*/ | */ |
String getAuthType() const | String getAuthType() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getAuthType(); | return _rep->getAuthType(); |
} | } |
| |
|
|
*/ | */ |
void setIpAddress(const String& ipAddress) | void setIpAddress(const String& ipAddress) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setIpAddress(ipAddress); | _rep->setIpAddress(ipAddress); |
} | } |
| |
|
|
*/ | */ |
String getIpAddress() const | String getIpAddress() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getIpAddress(); | return _rep->getIpAddress(); |
} | } |
| |
|
|
*/ | */ |
CIMKerberosSecurityAssociation* getSecurityAssociation() const | CIMKerberosSecurityAssociation* getSecurityAssociation() const |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getSecurityAssociation(); | return _rep->getSecurityAssociation(); |
} | } |
| |
|
|
*/ | */ |
void setSecurityAssociation() | void setSecurityAssociation() |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setSecurityAssociation(); | _rep->setSecurityAssociation(); |
} | } |
#endif | #endif |
| |
Array<SSLCertificateInfo*> getClientCertificateChain() | Array<SSLCertificateInfo*> getClientCertificateChain() |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getClientCertificateChain(); | return _rep->getClientCertificateChain(); |
} | } |
| |
void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate) | void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate) |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setClientCertificateChain(clientCertificate); | _rep->setClientCertificateChain(clientCertificate); |
} | } |
| |
|
|
*/ | */ |
void setRemotePrivilegedUserAccessChecked() | void setRemotePrivilegedUserAccessChecked() |
{ | { |
_checkRep(); |
CheckRep(_rep); |
_rep->setRemotePrivilegedUserAccessChecked(); | _rep->setRemotePrivilegedUserAccessChecked(); |
} | } |
| |
|
|
*/ | */ |
Boolean getRemotePrivilegedUserAccessChecked() | Boolean getRemotePrivilegedUserAccessChecked() |
{ | { |
_checkRep(); |
CheckRep(_rep); |
return _rep->getRemotePrivilegedUserAccessChecked(); | return _rep->getRemotePrivilegedUserAccessChecked(); |
} | } |
| |
|
|
| |
} | } |
| |
void _checkRep() const |
|
{ |
|
if (!_rep) |
|
throw UninitializedObjectException(); |
|
} |
|
|
|
AuthenticationInfoRep* _rep; | AuthenticationInfoRep* _rep; |
}; | }; |
| |