SenIdentityProvider.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SenIdentityProvider.h
00004 *  Part of     : Web Services Description
00005 *  Interface   : 
00006 *  Description : Class describes some IdentityProvider service
00007 *  Version     : 
00008 *
00009 *  Copyright © 2002-2005 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef SEN_IDENTITY_PROVIDER_H
00022 #define SEN_IDENTITY_PROVIDER_H
00023 
00024 //  INCLUDES
00025 #include <SenXmlServiceDescription.h>
00026 
00027 // CONSTANTS
00028 const TInt KSenAuthMaxUsernameLength = 32;
00029 const TInt KSenAuthMaxPasswordLength = 16;
00030 
00031 _LIT8(KIdentityProvider8, "IdentityProvider");  //@depricated
00032 _LIT8(KFakeIMEI8, "012345678901234");           //@depricated
00033 _LIT8(KContract8, "urn:liberty:as:2004-04");            //@depricated
00034 _LIT8(KSenIdpLocalname,                 "IdentityProvider");
00035 _LIT8(KSenIdpLibertyIdWsfAsContract,            "urn:liberty:as:2004-04");
00036 _LIT8(KWSAtomPubAuthenticationServiceContract,  "urn:atompub:as");
00037 _LIT8(KWSOviAuthenticationServiceContract,      "urn:ovi:as");
00038 _LIT8(KWSStarSTSContract,                       "urn:wstar:sts");
00039 _LIT8(KImei, "IMEI");           //@depricated
00040 _LIT8(KType, "type");           //@depricated
00041 
00042 _LIT8(KAuthzID8, "AuthzID");            //@depricated
00043 _LIT8(KAdvisoryAuthnID8, "AdvisoryAuthnID");                    //@depricated   
00044 _LIT8(KPassword8, "Password");          //@depricated
00045 _LIT8(KProviderID8, "ProviderID");              //@depricated
00046 _LIT8(KSenIdpAuthzIDLocalname,          "AuthzID");
00047 _LIT8(KSenIdpAdvisoryAuthnIdLocalname,  "AdvisoryAuthnID");
00048 _LIT8(KSenIdpPasswordLocalname,         "Password");
00049 _LIT8(KSenIdpProviderIdLocalname,       "ProviderID");
00050 _LIT8(KSenAccountExtensions,            "AccountExtensions");
00051 _LIT8(KSenAccAutoSignIn,                "AutoSignIn");
00052                 
00053 // DATA TYPES
00054 class TSenAuthentication
00055     {
00056     public:
00057         TBuf8<KSenAuthMaxUsernameLength> iUsername;
00058         TBuf8<KSenAuthMaxPasswordLength> iPassword;
00059     };
00060 
00061 // FORWARD DECLARATIONS
00062 class MSenIdentityManager;
00063 
00064 // CLASS DECLARATION
00065 
00081 class CSenIdentityProvider : public CSenXmlServiceDescription
00082     {
00083     public:  // Constructors and destructor
00084         
00097         IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint );
00098 
00112         IMPORT_C static CSenIdentityProvider* NewLC( const TDesC8& aEndpoint );
00113 
00128         IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00129                                                     const TDesC8& aContract );
00130 
00146         IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00147                                                     const TDesC8& aContract );
00148         
00165         IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00166                                                     const TDesC8& aContract,
00167                                                     const TDesC8& aProviderID);
00168 
00187         IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00188                                                     const TDesC8& aContract,
00189                                                     const TDesC8& aProviderID);
00190 
00212         IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00213                                                     const TDesC8& aContract,
00214                                                     const TDesC8& aProviderID,
00215                                                     const TDesC8& aServiceID);
00216 
00239         IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00240                                                     const TDesC8& aContract,
00241                                                     const TDesC8& aProviderID,
00242                                                     const TDesC8& aServiceID);
00243 
00247         IMPORT_C virtual ~CSenIdentityProvider();
00248 
00249         // New functions
00250 
00256         IMPORT_C virtual TPtrC8 AuthzID();
00257 
00263         IMPORT_C virtual TPtrC8 AdvisoryAuthnID();
00264 
00270         IMPORT_C TPtrC8 ProviderID();
00271 
00277         IMPORT_C virtual TPtrC8 Password();
00278 
00284         IMPORT_C const TDesC8& IMEI();
00285 
00291         IMPORT_C TPtrC8 UserName();
00292 
00299         IMPORT_C TInt SetProviderID( const TDesC8& aProviderID );
00300 
00312         IMPORT_C TInt SetServiceID( const TDesC8& aServiceID );
00313 
00323         IMPORT_C TBool IsTrustedByL( MSenServiceDescription& aServiceDescription );
00324 
00336         IMPORT_C TBool IsTrustedByL( const TDesC8& aProviderIdOrServiceId );
00337 
00343         IMPORT_C TBool IsDefault();
00344 
00356         IMPORT_C TInt SetUserInfoL( const TDesC8& aAuthzID,
00357                                     const TDesC8& aAdvisoryAuthnID,
00358                                     const TDesC8& aPassword );
00359 
00370         IMPORT_C HBufC8* HttpCredentialsL( MSenIdentityManager& aIdMgr );
00371     
00372         // Functions from base classes
00373     
00374         // From CSenXmlServiceDescription
00375         
00383         IMPORT_C const TDesC8& NewElementName();
00384 
00393         IMPORT_C TInt SetProviderIdL( const TDesC8& aProviderID );
00394         
00395         IMPORT_C TInt SetAccountExtensionsL(const TDesC8& aDetail);
00396         
00397         IMPORT_C TPtrC8 AccountExtensions(CSenElement*& aAccExt);
00398 
00399     protected:  
00400     
00401         /*
00402           C++ default constructor
00403         */
00404         IMPORT_C CSenIdentityProvider( TDescriptionClassType aType );
00405         
00406 
00407         // Functions from base classes
00408     
00409         // From CSenXmlServiceDescription
00410         
00421         IMPORT_C void ConstructL(const TDesC8& aEndPoint);
00422         
00435         IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00436                                  const TDesC8& aContract);
00437 
00453         IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00454                                  const TDesC8& aContract,
00455                                  const TDesC8& aProviderID);
00456 
00476         IMPORT_C void ConstructL( const TDesC8& aEndPoint,
00477                                   const TDesC8& aContract,
00478                                   const TDesC8& aProviderID,
00479                                   const TDesC8& aServiceID );
00480     };
00481 
00482 #endif // SEN_IDENTITY_PROVIDER_H
00483 
00484 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top