epoc32/include/mw/msenauthenticationprovider.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2002-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 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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    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).
    20 *
    21 */
    22 
    23 
    24 
    25 
    26 
    27 
    28 
    29 
    30 #ifndef M_SEN_AUTHENTICATION_PROVIDER_H
    31 #define M_SEN_AUTHENTICATION_PROVIDER_H
    32 
    33 // INCLUDES
    34 #include <e32std.h>
    35 
    36 // FORWARD DECLARATIONS
    37 class CSenIdentityProvider;
    38 
    39 /**
    40 * Interface description:
    41 *
    42 * The applications can register this callback interface, through which they will receive
    43 * userinfo callbacks (when data like username and password is needed).
    44 *
    45 * Both Service Connection and Service Manager APIs utilize this interface.
    46 *
    47 * In practice, service consumer applications often integrate these callbacks to their UI 
    48 * events, allowing them a control point end-user (login) prompts. 
    49 *
    50 * Furthermore, (remote) service management applications can provide identity (user account)
    51 * spesific "secret", in order to manipulate associated credentials stored in Web Services
    52 * -stack database(s).
    53 */
    54 class MSenAuthenticationProvider
    55     {
    56     public: 
    57         /**
    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. 
    67  
    68         */
    69         virtual const CSenIdentityProvider* IdentityProviderL() { return NULL; }
    70 
    71         /**
    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
    83         * elsewhere).
    84         * @return Password as string (UTF-8 descriptor)
    85         */
    86         virtual const TPtrC8 UsernameL() { return TPtrC8(KNullDesC8); }
    87 
    88         /**
    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
    99         * elsewhere).
   100         * @return Password as string (UTF-8 descriptor)
   101         */
   102         virtual const TPtrC8 PasswordL() { return TPtrC8(KNullDesC8); }
   103         
   104         /**
   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.
   110         */
   111     	inline virtual TAny* ExtendedInterface(const TInt32 /* aUid */) { return NULL; }
   112     };
   113 
   114 #endif // M_SEN_PROPERTIES_H
   115 
   116 // End of File
   117