|
1 /* |
|
2 * Copyright (c) 2008 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: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef WSOviPub_VALIDATE_HANDLER_H |
|
26 #define WSOviPub_VALIDATE_HANDLER_H |
|
27 |
|
28 #include <e32std.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 // CONSTANTS |
|
33 |
|
34 |
|
35 // INCLUDES |
|
36 #include <e32std.h> |
|
37 #include <flogger.h> |
|
38 #include "sensessionhandler.h" |
|
39 #include "wsovihandlercontext.h" |
|
40 #include "wsovisessioncontext.h" |
|
41 #include "SenIdentityProvider.h" |
|
42 #include "wsovioauthclient.h" |
|
43 #include "wsovicons.h" |
|
44 #include "wsoviservicesession.h" |
|
45 |
|
46 |
|
47 |
|
48 /** |
|
49 * Class: |
|
50 * |
|
51 * Description: An implementation of the CWSOviHandler definition. This is concrete |
|
52 * class, instance of which ECOM framework gives to ECOM clients. |
|
53 */ |
|
54 class CWSOviValidateHandler : public CSenSessionHandler |
|
55 { |
|
56 |
|
57 public: |
|
58 |
|
59 |
|
60 /** |
|
61 * Function: NewL |
|
62 * |
|
63 * Description: Create instance of concrete implementation. Note that ECOM |
|
64 * interface implementations can only have two signatures for |
|
65 * NewL: |
|
66 * - NewL without parameters (used here) |
|
67 * - NewL with TAny* pointer, which may provide some client |
|
68 * data |
|
69 * |
|
70 * Returns: Instance of this class. |
|
71 * |
|
72 * Note: The interface, which is abstract base class of this |
|
73 * implementation, also provides NewL method. Normally abstract |
|
74 * classes do not provide NewL, because they cannot create |
|
75 * instances of themselves. |
|
76 */ |
|
77 static CWSOviValidateHandler* NewL(TAny* aHandlerCtx); |
|
78 |
|
79 /** |
|
80 * InvokeL is the most emergent method in message handler interface. |
|
81 * Each sub-class must implement this method thus providing message |
|
82 * processing routine. |
|
83 * @param aCtx is the session context that will be accessed and |
|
84 * typically altered by implemented handler, in order to provide |
|
85 * modifications on the layer of the session construction, validation, |
|
86 * or some other, focused area that the handler was intended to take |
|
87 * responsibility for. For example, certain handler can itself create |
|
88 * a session of its own, send message(s) to (authentication) service |
|
89 * (invoking other handlers), and finally access session context in |
|
90 * order to update credentials. |
|
91 */ |
|
92 virtual TInt InvokeL(MSenSessionContext& aCtx); |
|
93 ~CWSOviValidateHandler(); |
|
94 virtual SenHandler::THandlerDirection Direction() const; |
|
95 virtual SenHandler::THandlerPhase Phase(); |
|
96 virtual TInt InitL(MSenHandlerContext& aCtx); |
|
97 RFileLogger* Log() const; |
|
98 MSenHandlerContext& HandlerContext(); |
|
99 protected: |
|
100 /** |
|
101 * Function: CWSOviValidateHandler |
|
102 * |
|
103 * Discussion: Perform the first phase of two phase construction |
|
104 */ |
|
105 CWSOviValidateHandler(MSenHandlerContext& aCtx); |
|
106 |
|
107 /** |
|
108 * Obtain or construct a valid SecurityTokenServiceClient. Ask |
|
109 * owned ServiceManager for ServiceDescriptions that match |
|
110 * Authentication server contract & ProviderID. |
|
111 * |
|
112 * @param providerID |
|
113 * @return SecurityTokenServiceClient |
|
114 */ |
|
115 CWSOviOAuthClient* AuthClientL(CSenIdentityProvider*& aIdentityProvider); |
|
116 |
|
117 /** |
|
118 * Function: ConstructL |
|
119 * |
|
120 * Discussion: Perform the second phase construction of a |
|
121 * CImplementationClassPlus object. |
|
122 */ |
|
123 void ConstructL(); |
|
124 |
|
125 private: |
|
126 /** |
|
127 * Function: IdentityProviderFromCoreL |
|
128 * |
|
129 * Discussion: copmplex getter. It asking core for IdentitProvider by using a pattern. |
|
130 */ |
|
131 |
|
132 CSenIdentityProvider* IdentityProviderFromCoreL(const TDesC8& aProviderID); |
|
133 const TDesC8* iVersion; |
|
134 }; |
|
135 |
|
136 |
|
137 #endif // WSOvi_VALIDATE_HANDLER_H |
|
138 |