MHTTPAuthenticationCallback Class Reference

#include <mw/http/mhttpauthenticationcallback.h>

class MHTTPAuthenticationCallback
Public Member Functions
pure virtual TBool GetCredentialsL(const TUriC8 &, RString, RStringF, RString &, RString &)

Detailed Description

The mixin 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, subclass off this class and implement GetCredentialsL. To install the class into a session, call InstallAuthenticationL.

Member Function Documentation

GetCredentialsL ( const TUriC8 &, RString, RStringF, RString &, RString & )

TBool GetCredentialsL(const TUriC8 &aURI,
RString &aUsername,
RString &aPassword
)[pure virtual]
Gets some credentials. Note that the first 3 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 who they are giving their credentials to, and how securely they will be transmitted.
aURIThe URI being requested
aRealmThe realm being requested
aAuthenticationTypeThe type of authentication (basic or digest)
aUsernameThe username is returned in this parameter. The caller will close the returned string.
aPasswordThe password is returned in this parameter The caller will close the returned string.
Return Value
True if credentials have been obtained.
Leave Codes
Anything.If this function leaves the transaction will be failed.

InstallAuthenticationL ( RHTTPSession )

Installs the callback into the session. Typicaly called from the implementation class's ConstructL().
The session is opened, but no transactions have been created on it
The session supports authentication, and uses this API to get its credentials.
aSessionthe session to install the filter into.
Leave Codes
KErrNoMemoryThere was not enough memory.