MHTTPAuthenticationCallback Class Reference
#include
<mw/http/mhttpauthenticationcallback.h>
class MHTTPAuthenticationCallback |
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 & )
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.
Parameters |
---|
aURI | The URI being requested |
aRealm | The realm being requested |
aAuthenticationType | The type of authentication (basic or digest) |
aUsername | The username is returned in this parameter. The caller will close the returned string. |
aPassword | The 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().
- Pre-condition
- The session is opened, but no transactions have been created on it
- Post-condition
- The session supports authentication, and uses this API to get its credentials.
Parameters |
---|
aSession | the session to install the filter into. |
Leave Codes |
---|
KErrNoMemory | There was not enough memory. |