version 1.3, 2002/07/26 20:01:19
|
version 1.15.18.1, 2006/02/10 16:09:29
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%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) | // 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) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#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> |
|
#include <Pegasus/Common/SSLContext.h> |
| |
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
#include <Pegasus/Common/CIMKerberosSecurityAssociation.h> |
|
#endif |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
public: | public: |
enum AuthStatus { NEW_REQUEST, CHALLENGE_SENT, AUTHENTICATED }; | enum AuthStatus { 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); |
| |
~AuthenticationInfoRep(); | ~AuthenticationInfoRep(); |
|
|
| |
void setAuthenticatedUser(const String& userName); | void setAuthenticatedUser(const String& userName); |
| |
|
String getAuthenticatedPassword() const |
|
{ |
|
return _authPassword; |
|
} |
|
|
|
void setAuthenticatedPassword(const String& password); |
|
|
String getAuthChallenge() const | String getAuthChallenge() const |
{ | { |
return _authChallenge; | return _authChallenge; |
|
|
| |
void setAuthType(const String& authType); | void setAuthType(const String& authType); |
| |
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
CIMKerberosSecurityAssociation* getSecurityAssociation() const |
|
{ |
|
return _securityAssoc.get(); |
|
} |
|
|
|
void setSecurityAssociation(); |
|
#endif |
|
|
|
Boolean isExportConnection() const |
|
{ |
|
return _exportConnection; |
|
} |
|
|
|
void setExportConnection(Boolean exportConnection); |
|
|
|
//PEP187 |
|
Array<SSLCertificateInfo*> getClientCertificateChain() |
|
{ |
|
return _clientCertificate; |
|
} |
|
|
|
//PEP187 |
|
void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate); |
|
|
private: | private: |
| |
/** Constructors */ | /** Constructors */ |
|
|
AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x); | AuthenticationInfoRep& operator=(const AuthenticationInfoRep& x); |
| |
String _authUser; | String _authUser; |
|
String _authPassword; |
String _authChallenge; | String _authChallenge; |
String _authSecret; | String _authSecret; |
Boolean _privileged; | Boolean _privileged; |
String _authType; | String _authType; |
AuthStatus _authStatus; | AuthStatus _authStatus; |
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
AutoPtr<CIMKerberosSecurityAssociation> _securityAssoc;//PEP101 |
|
#endif |
|
|
|
Boolean _exportConnection; |
|
Array<SSLCertificateInfo*> _clientCertificate; |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |