williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Callback interface through which (web service consumer/management)
|
williamr@2
|
15 |
* applications can provide userinfo / account (username & password)
|
williamr@2
|
16 |
* to WS-stack. This information can be used in actual authentication
|
williamr@2
|
17 |
* with (remote) web service (Liberty Authentication Service or
|
williamr@2
|
18 |
* WS-* STS), or locally (in device) to allow secure access to private
|
williamr@2
|
19 |
* information (like credentials to the service, etc).
|
williamr@2
|
20 |
*
|
williamr@2
|
21 |
*/
|
williamr@2
|
22 |
|
williamr@2
|
23 |
|
williamr@2
|
24 |
|
williamr@2
|
25 |
|
williamr@2
|
26 |
|
williamr@2
|
27 |
|
williamr@2
|
28 |
|
williamr@2
|
29 |
|
williamr@2
|
30 |
#ifndef M_SEN_AUTHENTICATION_PROVIDER_H
|
williamr@2
|
31 |
#define M_SEN_AUTHENTICATION_PROVIDER_H
|
williamr@2
|
32 |
|
williamr@2
|
33 |
// INCLUDES
|
williamr@2
|
34 |
#include <e32std.h>
|
williamr@2
|
35 |
|
williamr@2
|
36 |
// FORWARD DECLARATIONS
|
williamr@2
|
37 |
class CSenIdentityProvider;
|
williamr@2
|
38 |
|
williamr@2
|
39 |
/**
|
williamr@2
|
40 |
* Interface description:
|
williamr@2
|
41 |
*
|
williamr@2
|
42 |
* The applications can register this callback interface, through which they will receive
|
williamr@2
|
43 |
* userinfo callbacks (when data like username and password is needed).
|
williamr@2
|
44 |
*
|
williamr@2
|
45 |
* Both Service Connection and Service Manager APIs utilize this interface.
|
williamr@2
|
46 |
*
|
williamr@2
|
47 |
* In practice, service consumer applications often integrate these callbacks to their UI
|
williamr@2
|
48 |
* events, allowing them a control point end-user (login) prompts.
|
williamr@2
|
49 |
*
|
williamr@2
|
50 |
* Furthermore, (remote) service management applications can provide identity (user account)
|
williamr@2
|
51 |
* spesific "secret", in order to manipulate associated credentials stored in Web Services
|
williamr@2
|
52 |
* -stack database(s).
|
williamr@2
|
53 |
*/
|
williamr@2
|
54 |
class MSenAuthenticationProvider
|
williamr@2
|
55 |
{
|
williamr@2
|
56 |
public:
|
williamr@2
|
57 |
/**
|
williamr@2
|
58 |
* If (consumer) application needs to access protected information or service
|
williamr@2
|
59 |
* (behind some identity / account / sing-in process), it may choose to override
|
williamr@2
|
60 |
* this method. Returned object represents XML containing all required information
|
williamr@2
|
61 |
* that is required to securely authenticate the identity in question.
|
williamr@2
|
62 |
* In case that only username & password -pair is needed, application may
|
williamr@2
|
63 |
* alternatively implement UsernameL() and PasswordL() callbacks.
|
williamr@2
|
64 |
* @returs the identity provider description that contains "credentials", like
|
williamr@2
|
65 |
* like username and password of some identity (user's account), or other (binary)
|
williamr@2
|
66 |
* secret, like fingerprint.
|
williamr@2
|
67 |
|
williamr@2
|
68 |
*/
|
williamr@2
|
69 |
virtual const CSenIdentityProvider* IdentityProviderL() { return NULL; }
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
* Callback type getter for username.
|
williamr@2
|
73 |
* through this method an application may choose to provide the username of
|
williamr@2
|
74 |
* an account it wishes to use.
|
williamr@2
|
75 |
* In cases where the username (login ID) is in simple text format (descriptor),
|
williamr@2
|
76 |
* this may be the most convenient method to be overridden. Alternatively,
|
williamr@2
|
77 |
* in complex cases, applications may choose to provide identity provider (IDP)
|
williamr@2
|
78 |
* description, a piece of XML through IdentityProviderL() callback; that
|
williamr@2
|
79 |
* XML could contain extended amount of (binary) information, like fingerprint.
|
williamr@2
|
80 |
* Consumer application is supposed to decide, whether or not to show a GUI
|
williamr@2
|
81 |
* dialog when this callback is issued: in many cases, that is a common
|
williamr@2
|
82 |
* approach to prompt userinfo directly from end-user (unless data is cached
|
williamr@2
|
83 |
* elsewhere).
|
williamr@2
|
84 |
* @return Password as string (UTF-8 descriptor)
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
virtual const TPtrC8 UsernameL() { return TPtrC8(KNullDesC8); }
|
williamr@2
|
87 |
|
williamr@2
|
88 |
/**
|
williamr@2
|
89 |
* Callback type getter for password.
|
williamr@2
|
90 |
* Application may choose to provide the passport of an account through this
|
williamr@2
|
91 |
* method. In cases where the "secret" is in simple text format (descriptor),
|
williamr@2
|
92 |
* this may be the most convenient method to be overridden. Alternatively,
|
williamr@2
|
93 |
* in complex cases, applications may choose to provide identity provider (IDP)
|
williamr@2
|
94 |
* description, a piece of XML through IdentityProviderL() callback; that
|
williamr@2
|
95 |
* XML could contain extended amount of (binary) information, like fingerprint.
|
williamr@2
|
96 |
* Consumer application is supposed to decide, whether or not to show a GUI
|
williamr@2
|
97 |
* dialog when this callback is issued: in many cases, that is a common
|
williamr@2
|
98 |
* approach to prompt userinfo directly from end-user (unless data is cached
|
williamr@2
|
99 |
* elsewhere).
|
williamr@2
|
100 |
* @return Password as string (UTF-8 descriptor)
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
virtual const TPtrC8 PasswordL() { return TPtrC8(KNullDesC8); }
|
williamr@2
|
103 |
|
williamr@2
|
104 |
/**
|
williamr@2
|
105 |
* This method obtains the callback interface matching the specified uid.
|
williamr@2
|
106 |
* @param aUid the uid identifying the required interface.
|
williamr@2
|
107 |
* @return NULL if no interface matching the uid is found.
|
williamr@2
|
108 |
* Otherwise, attempt to dynamically cast this pointer
|
williamr@2
|
109 |
* to that interface will be made.
|
williamr@2
|
110 |
*/
|
williamr@2
|
111 |
inline virtual TAny* ExtendedInterface(const TInt32 /* aUid */) { return NULL; }
|
williamr@2
|
112 |
};
|
williamr@2
|
113 |
|
williamr@2
|
114 |
#endif // M_SEN_PROPERTIES_H
|
williamr@2
|
115 |
|
williamr@2
|
116 |
// End of File
|
williamr@2
|
117 |
|