version 1.10, 2002/08/17 00:59:36
|
version 1.23, 2004/12/07 22:43:14
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2004//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software 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 copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
// Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com) | // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com) |
// | // |
// Modified By: |
// Modified By: Jair Santos, Hewlett-Packard Company (jair.santos@hp.com) |
|
// Heather Sterling, IBM (hsterl@us.ibm.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/Common/AuthenticationInfoRep.h> | #include <Pegasus/Common/AuthenticationInfoRep.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
|
#include <Pegasus/Common/SSLContext.h> |
| |
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
#include <Pegasus/Common/CIMKerberosSecurityAssociation.h> |
|
#endif |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
_rep->setAuthenticatedUser(userName); | _rep->setAuthenticatedUser(userName); |
} | } |
| |
|
/** Get the previously authenticated password |
|
@return the authenticated password |
|
*/ |
|
String getAuthenticatedPassword() const |
|
{ |
|
_checkRep(); |
|
return _rep->getAuthenticatedPassword(); |
|
} |
|
|
|
/** Sets the authenticated password |
|
@param password - string containing the authenticated password |
|
*/ |
|
void setAuthenticatedPassword(const String& password) |
|
{ |
|
_checkRep(); |
|
_rep->setAuthenticatedPassword(password); |
|
} |
|
|
/** Get the authentication challenge that was sent to the client | /** Get the authentication challenge that was sent to the client |
@return string containing the authentication challenge | @return string containing the authentication challenge |
*/ | */ |
|
|
return _rep->getAuthType(); | return _rep->getAuthType(); |
} | } |
| |
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
/** Get the CIM Security Association |
|
@return a pointer to the CIM Security Association |
|
*/ |
|
CIMKerberosSecurityAssociation* getSecurityAssociation() const |
|
{ |
|
_checkRep(); |
|
return _rep->getSecurityAssociation(); |
|
} |
|
|
|
/** Set the CIM Security Association |
|
The pointer will only be set once. If it is already set it will |
|
not reset it. |
|
*/ |
|
void setSecurityAssociation() |
|
{ |
|
_checkRep(); |
|
_rep->setSecurityAssociation(); |
|
} |
|
#endif |
|
|
|
/** Indicate whether the export connection flag is set or not |
|
*/ |
|
Boolean isExportConnection() const |
|
{ |
|
_checkRep(); |
|
return _rep->isExportConnection(); |
|
} |
|
|
|
/** Set the export connection flag |
|
*/ |
|
void setExportConnection(Boolean exportConnection) |
|
{ |
|
_checkRep(); |
|
_rep->setExportConnection(exportConnection); |
|
} |
|
|
|
//PEP187 |
|
SSLCertificateInfo* getClientCertificate() |
|
{ |
|
_checkRep(); |
|
return _rep->getClientCertificate(); |
|
} |
|
|
|
//PEP187 |
|
void setClientCertificate(SSLCertificateInfo* clientCertificate) |
|
{ |
|
_checkRep(); |
|
_rep->setClientCertificate(clientCertificate); |
|
} |
|
|
private: | private: |
| |
AuthenticationInfo(AuthenticationInfoRep* rep) : _rep(rep) | AuthenticationInfo(AuthenticationInfoRep* rep) : _rep(rep) |
|
|
void _checkRep() const | void _checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
throw UninitializedHandle (); |
throw UninitializedObjectException(); |
} | } |
| |
AuthenticationInfoRep* _rep; | AuthenticationInfoRep* _rep; |