|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: class M3GPPAuthenticationCallback definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __M3GPPAUTHENTICATIONCALLBACK_H__ |
|
20 #define __M3GPPAUTHENTICATIONCALLBACK_H__ |
|
21 |
|
22 // System includes |
|
23 #include <uri8.h> |
|
24 #include <stringpool.h> |
|
25 #include <http/rhttpsession.h> |
|
26 |
|
27 /** |
|
28 @public |
|
29 @class M3GPPAuthenticationCallback |
|
30 |
|
31 The mixin that needs to be implemented if 3gpp digest AKA authentication is to be |
|
32 supported. This supplies the username and password and nonce when they are |
|
33 needed for authentication. |
|
34 To use, subclass off this class and implement GetCredentialsL. To install |
|
35 the class into a session, call InstallAuthenticationL. |
|
36 */ |
|
37 |
|
38 class M3GPPAuthenticationCallback |
|
39 { |
|
40 public: |
|
41 /** Gets some credentials. Note that the first 3 parameters are |
|
42 informational and many clients may not have a use for |
|
43 them. Clients may want to display some or all of these |
|
44 parameters to the user, so that the user knows who they are |
|
45 giving their credentials to, and how securely they will be |
|
46 transmitted. |
|
47 @param aURI The URI being requested |
|
48 @param aRealm The realm being requested |
|
49 @param aNonce The value of the nonce field: used to transport RAND/AUTN vectors |
|
50 @param aAuthenticationType The type of authentication (basic or digest) |
|
51 @param aAlgorithm The algorithm used in the Digest procedure eg MD5 |
|
52 @param aUsername The username is returned in this parameter. |
|
53 The caller will close the returned string. |
|
54 @param aPassword The password is returned in this parameter |
|
55 The caller will close the returned string. |
|
56 @param aResync The AUTS - authentication resyncronization value is returned in this parameter |
|
57 The caller will close the returned string. If aResyncRequired is false this variable will not be initialized. |
|
58 @param aResyncRequired will be set to true, if call caused the uicc to request resynchronization |
|
59 @return True if credentials have been obtained. |
|
60 @exception Anything. If this function leaves the transaction will be |
|
61 failed. |
|
62 */ |
|
63 //##ModelId=3B1E52A5015D |
|
64 virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, RString aNonce, |
|
65 RString aAlgorithm, |
|
66 RString& aUsername, |
|
67 RString& aPassword, |
|
68 RString& aResync, |
|
69 TBool& aResyncRequired) = 0; |
|
70 |
|
71 }; |
|
72 |
|
73 |
|
74 |
|
75 #endif // __M3GPPAUTHENTICATIONCALLBACK_H__ |
|
76 |
|
77 |
|
78 //EOF |