00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SEN_IDENTITY_PROVIDER_H
00022 #define SEN_IDENTITY_PROVIDER_H
00023
00024
00025 #include <SenXmlServiceDescription.h>
00026
00027
00028 const TInt KSenAuthMaxUsernameLength = 32;
00029 const TInt KSenAuthMaxPasswordLength = 16;
00030
00031 _LIT8(KIdentityProvider8, "IdentityProvider");
00032 _LIT8(KFakeIMEI8, "012345678901234");
00033 _LIT8(KContract8, "urn:liberty:as:2004-04");
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");
00040 _LIT8(KType, "type");
00041
00042 _LIT8(KAuthzID8, "AuthzID");
00043 _LIT8(KAdvisoryAuthnID8, "AdvisoryAuthnID");
00044 _LIT8(KPassword8, "Password");
00045 _LIT8(KProviderID8, "ProviderID");
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
00054 class TSenAuthentication
00055 {
00056 public:
00057 TBuf8<KSenAuthMaxUsernameLength> iUsername;
00058 TBuf8<KSenAuthMaxPasswordLength> iPassword;
00059 };
00060
00061
00062 class MSenIdentityManager;
00063
00064
00065
00081 class CSenIdentityProvider : public CSenXmlServiceDescription
00082 {
00083 public:
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
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
00373
00374
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
00403
00404 IMPORT_C CSenIdentityProvider( TDescriptionClassType aType );
00405
00406
00407
00408
00409
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