CSIPHttpDigest Class Reference

#include <mw/siphttpdigest.h>

Link against: sipclient.lib

class CSIPHttpDigest : public CBase

Inherits from

Detailed Description

Class for managing SIP HTTP Digest security settings. Class provides functions for setting/removing HTTP Digest security mechanism related parameters. If the user does not use the class for the providing credentials for the received challenges, an error will be returned to the original request in case it was challenged.

Note that the user will be asked to provide credentials one realm at the time.

Constructor & Destructor Documentation

~CSIPHttpDigest ( )

IMPORT_C~CSIPHttpDigest()

Member Function Documentation

CSIPDeleted ( )

voidCSIPDeleted()

IgnoreChallenge ( const TDesC8 & )

IMPORT_C TIntIgnoreChallenge(const TDesC8 &aRealm)
Ignores the challenge for the realm. As a result the error will be generated to the original SIP request.
Pre-condition
aRealm must not be an empty descriptor
Parameters
aRealma realm for which the challenge was ignored
Return Value
KErrNone if no error KErrNotFound if the given realm was not found KErrArgument if aRealm is an empty descriptor

IgnoreChallenge ( const CSIPClientTransaction &, const TDesC8 & )

IMPORT_C TIntIgnoreChallenge(const CSIPClientTransaction &aTransaction,
const TDesC8 &aRealm
)
Ignores the challenge for the realm for the specific transaction. As a result KErrForbidden will be generated to the original SIP request.
Pre-condition
aRealm must not be an empty descriptor
Parameters
aTransactionthe transaction that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
aRealma realm for which the challenge was ignored
Return Value
KErrNone if no error KErrNotFound if the given realm was not found KErrArgument if aRealm is an empty descriptor

IgnoreChallenge ( const CSIPRefresh &, const TDesC8 & )

IMPORT_C TIntIgnoreChallenge(const CSIPRefresh &aRefresh,
const TDesC8 &aRealm
)
Ignores the challenge for the realm for the specific refresh. As a result the error will be generated to the original SIP request.
Pre-condition
aRealm must not be an empty descriptor
Parameters
aRefreshthe refresh that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
aRealma realm for which the challenge was ignored
Return Value
KErrNone if no error KErrNotFound if the given realm was not found KErrArgument if aRealm is an empty descriptor

NewL ( CSIP &, MSIPHttpDigestChallengeObserver & )

IMPORT_C CSIPHttpDigest *NewL(CSIP &aSIP,
MSIPHttpDigestChallengeObserver &aObserver
)[static]

Two-phased constructor.

Parameters
aSIPa handle to SIP server
aObserveran observer for the received challenges
Return Value
New object, ownership is transferred.

NewL ( CSIP &, MSIPHttpDigestChallengeObserver2 & )

IMPORT_C CSIPHttpDigest *NewL(CSIP &aSIP,
MSIPHttpDigestChallengeObserver2 &aObserver2
)[static]

Two-phased constructor.

Parameters
aSIPa handle to SIP server
aObserver2an observer for the received challenges
Return Value
New object, ownership is transferred.

NewLC ( CSIP &, MSIPHttpDigestChallengeObserver & )

IMPORT_C CSIPHttpDigest *NewLC(CSIP &aSIP,
MSIPHttpDigestChallengeObserver &aObserver
)[static]

Two-phased constructor.

Parameters
aSIPa handle to SIP server
aObserveran observer for the received challenges
Return Value
New object, ownership is transferred.

NewLC ( CSIP &, MSIPHttpDigestChallengeObserver2 & )

IMPORT_C CSIPHttpDigest *NewLC(CSIP &aSIP,
MSIPHttpDigestChallengeObserver2 &aObserver2
)[static]

Two-phased constructor.

Parameters
aSIPa handle to SIP server
aObserver2an observer for the received challenges
Return Value
New object, ownership is transferred.

RemoveCredentials ( const TDesC8 & )

IMPORT_C TIntRemoveCredentials(const TDesC8 &aRealm)
Removes all set credentials for the realm. Must not be used if the user implements MSIPHttpDigestChallengeObserver2.
Pre-condition
aRealm must not be an empty descriptor
Parameters
aRealmservers's realm
Return Value
KErrNone if no error KErrArgument if aRealm is an empty descriptor KErrNoMemory if out of memory KErrNotFound if the given realm was not found

RemoveCredentials ( )

IMPORT_C TIntRemoveCredentials()

Removes all set credentials by the user. Must not be used if the user implements MSIPHttpDigestChallengeObserver2.

Return Value
KErrNone if succesful; KErrNoMemory if out of memory

SetCredentialsL ( const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 & )

IMPORT_C voidSetCredentialsL(const TDesC8 &aOutboundProxy,
const TDesC8 &aRealm,
const TDesC8 &aUsername,
const TDesC8 &aPasswd
)
Sets credentials for the realm of the outbound proxy. Must be used in case the realm is the realm of the outbound proxy and the request for credentials was received from callback MSIPHttpDigestChallengeObserver::ChallengeReceived. The user can set credentials only upon request from the SIP implementation.
Pre-condition
aOutboundProxy, aRealm, aUsername and aPasswd must not be empty descriptors.
Parameters
aOutboundProxyan outbound proxy (FQDN or IP address)
aRealmservers's realm
aUsernameuser's name
aPasswduser's password for the given server's realm
Leave Codes
KErrNoMemoryif out of memory
KErrArgumentif some of the parameters is an empty descriptor
KErrSIPResourceNotAvailableif a required object has been deleted

SetCredentialsL ( const TDesC8 &, const TDesC8 &, const TDesC8 & )

IMPORT_C voidSetCredentialsL(const TDesC8 &aRealm,
const TDesC8 &aUsername,
const TDesC8 &aPasswd
)
Sets parameters for the realm. Should be used in case the realm is not a realm of an outbound proxy and the request for credentials was received from callback MSIPHttpDigestChallengeObserver::ChallengeReceived. The user can set credentials only upon request from the SIP implementation.
Pre-condition
aRealm, aUsername and aPasswd must not be empty descriptors.
Parameters
aRealmservers's realm
aUsernameuser's name
aPasswduser's password for the given server's realm
Leave Codes
KErrNoMemoryif out of memory
KErrArgumentif some of the parameters is an empty descriptor
KErrSIPResourceNotAvailableif a required object has been deleted

SetCredentialsL ( const CSIPClientTransaction &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 & )

IMPORT_C voidSetCredentialsL(const CSIPClientTransaction &aTransaction,
const TDesC8 &aOutboundProxy,
const TDesC8 &aRealm,
const TDesC8 &aUsername,
const TDesC8 &aPasswd
)
Sets credentials for the realm for the specific transaction. Must be used when the request for credentials was received from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with CSIPClientTransaction as the parameter.
Pre-condition
aRealm, aUsername and aPasswd must not be empty descriptors.
Parameters
aTransactionthe transaction that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
aOutboundProxyan outbound proxy (FQDN or IP address) if the challenge received had Proxy-Authenticate-header(s). Otherwise KNullDesC8 should passed.
aRealmservers's realm
aUsernameuser's name
aPasswduser's password for the given server's realm
Leave Codes
KErrNoMemoryif out of memory
KErrArgumentif some of the parameters is an empty descriptor
KErrSIPResourceNotAvailableif a required object has been deleted

SetCredentialsL ( const CSIPRefresh &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 & )

IMPORT_C voidSetCredentialsL(const CSIPRefresh &aRefresh,
const TDesC8 &aOutboundProxy,
const TDesC8 &aRealm,
const TDesC8 &aUsername,
const TDesC8 &aPasswd
)
Sets credentials for the realm for the specific refresh. Must be used when the request for credentials was received from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with CSIPRefresh as the parameter.
Pre-condition
aRealm, aUsername and aPasswd must not be empty descriptors.
Parameters
aRefreshthe refresh that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
aOutboundProxyan outbound proxy (FQDN or IP address) if the challenge received had Proxy-Authenticate-header(s). Otherwise KNullDesC8 should passed.
aRealmservers's realm
aUsernameuser's name
aPasswduser's password for the given server's realm
Leave Codes
KErrNoMemoryif out of memory
KErrArgumentif some of the parameters is an empty descriptor
KErrSIPResourceNotAvailableif a required object has been deleted

SetObserver ( MSIPHttpDigestChallengeObserver & )

IMPORT_C voidSetObserver(MSIPHttpDigestChallengeObserver &aObserver)

Sets the observer to listen for the possible received challenges. Replaces the existing MSIPHttpDigestChallengeObserver or MSIPHttpDigestChallengeObserver2.

Parameters
aObserveran observer for the received challenges.

SetObserver ( MSIPHttpDigestChallengeObserver2 & )

IMPORT_C voidSetObserver(MSIPHttpDigestChallengeObserver2 &aObserver)

Sets the observer to listen for the possible received challenges. Replaces the existing MSIPHttpDigestChallengeObserver or MSIPHttpDigestChallengeObserver2.

Parameters
aObserveran observer for the received challenges.