version 1.8.4.2, 2004/04/25 20:39:57
|
version 1.19, 2006/10/20 18:06:02
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., 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.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // 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: Jair Santos, Hewlett-Packard Company(jair.santos@hp.com) |
|
// Heather Sterling, IBM (hsterl@us.ibm.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_AuthenticationInfoRep_h | #ifndef Pegasus_AuthenticationInfoRep_h |
#define Pegasus_AuthenticationInfoRep_h | #define Pegasus_AuthenticationInfoRep_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
|
#include <Pegasus/Common/ArrayInternal.h> |
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Sharable.h> | #include <Pegasus/Common/Sharable.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
|
|
class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep : public Sharable | class PEGASUS_COMMON_LINKAGE AuthenticationInfoRep : public Sharable |
{ | { |
public: | public: |
enum AuthStatus |
enum AuthStatus { NEW_REQUEST, CHALLENGE_SENT, AUTHENTICATED }; |
{ |
|
NEW_REQUEST, CHALLENGE_SENT, AUTHENTICATED |
//ATTN: we should be using an enumeration for the authtype instead of a string. |
}; |
//In the AuthenticationManager, the authtype is set to Basic, Digest, etc |
|
//We also need to be able to check whether the type is SSL, so I'm adding a |
|
//string here to make it less arbitrary. PEP165 |
|
static const String AUTH_TYPE_SSL; |
| |
AuthenticationInfoRep(Boolean flag); | AuthenticationInfoRep(Boolean flag); |
| |
|
|
| |
void setAuthType(const String& authType); | void setAuthType(const String& authType); |
| |
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
void setIpAddress(const String& ipAddress) |
CIMKerberosSecurityAssociation* getSecurityAssociation() const |
|
{ | { |
return _securityAssoc; |
_ipAddress = ipAddress; |
} | } |
| |
void setSecurityAssociation(); |
String getIpAddress() |
#endif |
{ |
|
return _ipAddress; |
|
} |
| |
#ifdef PEGASUS_USE_232_CLIENT_VERIFICATION |
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
#ifdef PEGASUS_HAS_SSL |
CIMKerberosSecurityAssociation* getSecurityAssociation() const |
SSLCertificateInfo* getPeerCertificate() const |
|
{ | { |
return _peerCertificate; |
return _securityAssoc.get(); |
} | } |
| |
void setPeerCertificate(SSLCertificateInfo* peerCertificate); |
void setSecurityAssociation(); |
|
#endif |
| |
Sint32 getCertificateStatus() const |
//PEP187 |
|
Array<SSLCertificateInfo*> getClientCertificateChain() |
{ | { |
return _certificateStatus; |
return _clientCertificate; |
} | } |
| |
void setCertificateStatus(Sint32 certificateStatus); |
//PEP187 |
#endif |
void setClientCertificateChain(Array<SSLCertificateInfo*> |
#endif |
clientCertificate); |
| |
private: | private: |
| |
|
|
Boolean _privileged; | Boolean _privileged; |
String _authType; | String _authType; |
AuthStatus _authStatus; | AuthStatus _authStatus; |
|
String _ipAddress; |
#ifdef PEGASUS_KERBEROS_AUTHENTICATION | #ifdef PEGASUS_KERBEROS_AUTHENTICATION |
CIMKerberosSecurityAssociation * _securityAssoc; |
AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101 |
#endif | #endif |
| |
#ifdef PEGASUS_USE_232_CLIENT_VERIFICATION |
Array<SSLCertificateInfo*> _clientCertificate; |
#ifdef PEGASUS_HAS_SSL |
|
Sint32 _certificateStatus; |
|
SSLCertificateInfo* _peerCertificate; |
|
#endif |
|
#endif |
|
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |