version 1.14, 2003/08/11 22:06:51
|
version 1.31, 2006/11/10 18:14:57
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// 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. |
|
// 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 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) |
|
// |
|
// Modified By: |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_AuthenticationInfo_h | #ifndef Pegasus_AuthenticationInfo_h |
|
|
#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 | #ifdef PEGASUS_KERBEROS_AUTHENTICATION |
#include "CIMKerberosSecurityAssociation.h" |
#include <Pegasus/Common/CIMKerberosSecurityAssociation.h> |
#endif | #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(); |
} | } |
| |
|
/** |
|
Set the IP address to the specified IP address |
|
@param string containing the IP address |
|
*/ |
|
void setIpAddress(const String& ipAddress) |
|
{ |
|
_checkRep(); |
|
_rep->setIpAddress(ipAddress); |
|
} |
|
|
|
/** |
|
Get the IP address of the connection |
|
|
|
NOTE: The IP address is for debug use only. |
|
It should not be used for authentication purposes. |
|
|
|
@return string containing the IP address |
|
*/ |
|
String getIpAddress() const |
|
{ |
|
_checkRep(); |
|
return _rep->getIpAddress(); |
|
} |
|
|
|
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION | #ifdef PEGASUS_KERBEROS_AUTHENTICATION |
/** Get the CIM Security Association | /** Get the CIM Security Association |
@return a pointer to the CIM Security Association | @return a pointer to the CIM Security Association |
|
|
void setSecurityAssociation() | void setSecurityAssociation() |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->setSecurityAssociation(); |
_rep->setSecurityAssociation(); |
} | } |
#endif | #endif |
| |
|
Array<SSLCertificateInfo*> getClientCertificateChain() |
|
{ |
|
_checkRep(); |
|
return _rep->getClientCertificateChain(); |
|
} |
|
|
|
void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate) |
|
{ |
|
_checkRep(); |
|
_rep->setClientCertificateChain(clientCertificate); |
|
} |
|
|
|
/** Set flag to show that isRemotePrivilegedUserAccess check has been done |
|
this function should only be used by OpenPegasus AuthenticationHandlers |
|
*/ |
|
void setRemotePrivilegedUserAccessChecked() |
|
{ |
|
_checkRep(); |
|
_rep->setRemotePrivilegedUserAccessChecked(); |
|
} |
|
|
|
/** Indicates whether the isRemotePrivilegedUserAccess check has been |
|
performed. This method should only be used by OpenPegasus |
|
AuthenticationHandlers |
|
*/ |
|
Boolean getRemotePrivilegedUserAccessChecked() |
|
{ |
|
_checkRep(); |
|
return _rep->getRemotePrivilegedUserAccessChecked(); |
|
} |
|
|
private: | private: |
| |
AuthenticationInfo(AuthenticationInfoRep* rep) : _rep(rep) | AuthenticationInfo(AuthenticationInfoRep* rep) : _rep(rep) |