|
1 /* |
|
2 * Copyright (c) 2006-2006 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 WSSTAR_VALIDATE_HANDLER_H |
|
26 #define WSSTAR_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 "wsstarhandlercontext.h" |
|
40 #include "wsstarsessioncontext.h" |
|
41 #include "SenIdentityProvider.h" |
|
42 #include "wsstartrustclient.h" |
|
43 #include "wsstarcons.h" |
|
44 #include "wsstarservicesession.h" |
|
45 |
|
46 |
|
47 |
|
48 /** |
|
49 * Class: |
|
50 * |
|
51 * Description: An implementation of the CWSStarHandler definition. This is concrete |
|
52 * class, instance of which ECOM framework gives to ECOM clients. |
|
53 */ |
|
54 class CWSStarValidateHandler : 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 CWSStarValidateHandler* 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. One example of such session handler |
|
91 * could be WS-TRUST client type handler, an "internal service consumer". |
|
92 */ |
|
93 virtual TInt InvokeL(MSenSessionContext& aCtx); |
|
94 ~CWSStarValidateHandler(); |
|
95 virtual SenHandler::THandlerDirection Direction() const; |
|
96 virtual SenHandler::THandlerPhase Phase(); |
|
97 virtual TInt InitL(MSenHandlerContext& aCtx); |
|
98 RFileLogger* Log() const; |
|
99 |
|
100 protected: |
|
101 /** |
|
102 * Function: CWSStarValidateHandler |
|
103 * |
|
104 * Discussion: Perform the first phase of two phase construction |
|
105 */ |
|
106 CWSStarValidateHandler(MSenHandlerContext& aCtx); |
|
107 |
|
108 /** |
|
109 * Obtain or construct a valid SecurityTokenServiceClient. Ask |
|
110 * owned ServiceManager for ServiceDescriptions that match |
|
111 * STS contract & ProviderID. |
|
112 * |
|
113 * @param providerID |
|
114 * @return SecurityTokenServiceClient |
|
115 */ |
|
116 CWSStarTrustClient* STSClientL(CSenIdentityProvider*& aIdentityProvider); |
|
117 |
|
118 /** |
|
119 * Function: ConstructL |
|
120 * |
|
121 * Discussion: Perform the second phase construction of a |
|
122 * CImplementationClassPlus object. |
|
123 */ |
|
124 void ConstructL(); |
|
125 |
|
126 private: |
|
127 /** |
|
128 * Function: IdentityProviderFromCoreL |
|
129 * |
|
130 * Discussion: copmplex getter. It asking core for IdentitProvider by using a pattern. |
|
131 */ |
|
132 |
|
133 CSenIdentityProvider* IdentityProviderFromCoreL(const TDesC8& aProviderID); |
|
134 const TDesC8* iVersion; |
|
135 }; |
|
136 |
|
137 |
|
138 #endif // WSSTAR_VALIDATE_HANDLER_H |
|
139 |