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