Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: http\mhttpauthenticationcallback.h

Class MHTTPAuthenticationCallback

class MHTTPAuthenticationCallback

Support

Supported from 7.0

Description

Abstract interface that needs to be implemented if authentication is to be supported.

This supplies the username and password when they are needed for authentication. To use, implement GetCredentialsL() in a derived class. To install the class into a session, call InstallAuthenticationL().

Defined in MHTTPAuthenticationCallback:
GetCredentialsL(), InstallAuthenticationL()


Member Functions


GetCredentialsL()

virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, RStringF aAuthenticationType, RString& aUsername, RString& aPassword)=0;

Description

Gets authentication credentials.

Note that the first three parameters are informational and many clients may not have a use for them. Clients may want to display some or all of these parameters to the user, so that the user knows to whom they are giving their credentials, and how securely they will be transmitted.

Parameters

const TUriC8& aURI

The URI being requested

RString aRealm

The realm being requested

RStringF aAuthenticationType

The type of authentication, basic (HTTP::EBasic) or digest (HTTP::EDigest)

RString& aUsername

The username is returned in this parameter. The caller must close the returned string.

RString& aPassword

The password is returned in this parameter The caller must close the returned string.

Return value

TBool

True if credentials have been obtained.

Leave codes

If this function leaves, the transaction will be failed.


InstallAuthenticationL()

inline void InstallAuthenticationL(RHTTPSession aSession);

Description

Installs the callback into the session.

This is typically called from the implementation class's ConstructL().

Parameters

RHTTPSession aSession

the session to install the filter into.

Leave codes

KErrNoMemory