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(KImei, "IMEI");
00035 _LIT8(KType, "type");
00036 _LIT8(KAuthzID8, "AuthzID");
00037 _LIT8(KAdvisoryAuthnID8, "AdvisoryAuthnID");
00038 _LIT8(KPassword8, "Password");
00039 _LIT8(KProviderID8, "ProviderID");
00040
00041
00042 class TSenAuthentication
00043 {
00044 public:
00045 TBuf8<KSenAuthMaxUsernameLength> iUsername;
00046 TBuf8<KSenAuthMaxPasswordLength> iPassword;
00047 };
00048
00049
00050 class MSenIdentityManager;
00051 class CSenHttpChannel;
00052
00053
00054
00070 class CSenIdentityProvider : public CSenXmlServiceDescription
00071 {
00072 public:
00073
00086 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint );
00087
00101 IMPORT_C static CSenIdentityProvider* NewLC( const TDesC8& aEndpoint );
00102
00117 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00118 const TDesC8& aContract );
00119
00135 IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00136 const TDesC8& aContract );
00137
00154 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00155 const TDesC8& aContract,
00156 const TDesC8& aProviderID);
00157
00176 IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00177 const TDesC8& aContract,
00178 const TDesC8& aProviderID);
00179
00201 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00202 const TDesC8& aContract,
00203 const TDesC8& aProviderID,
00204 const TDesC8& aServiceID);
00205
00228 IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00229 const TDesC8& aContract,
00230 const TDesC8& aProviderID,
00231 const TDesC8& aServiceID);
00232
00236 IMPORT_C virtual ~CSenIdentityProvider();
00237
00238
00239
00245 IMPORT_C virtual TPtrC8 AuthzID();
00246
00252 IMPORT_C virtual TPtrC8 AdvisoryAuthnID();
00253
00259 IMPORT_C TPtrC8 ProviderID();
00260
00266 IMPORT_C virtual TPtrC8 Password();
00267
00273 IMPORT_C const TDesC8& IMEI();
00274
00280 IMPORT_C TPtrC8 UserName();
00281
00288 IMPORT_C TInt SetProviderID( const TDesC8& aProviderID );
00289
00301 IMPORT_C TInt SetServiceID( const TDesC8& aServiceID );
00302
00312 IMPORT_C TBool IsTrustedByL( MSenServiceDescription& aServiceDescription );
00313
00323 IMPORT_C TBool IsTrustedByL( const TDesC8& aProviderID );
00324
00330 IMPORT_C TBool IsDefault();
00331
00343 IMPORT_C TInt SetUserInfoL(const TDesC8& aAuthzID,
00344 const TDesC8& aAdvisoryAuthnID,
00345 const TDesC8& aPassword );
00346
00356 IMPORT_C HBufC8* HttpCredentialsL(MSenIdentityManager& aIdMgr);
00357
00358
00359
00360
00361
00369 IMPORT_C const TDesC8& NewElementName();
00370
00371 protected:
00372
00373
00374
00375
00376 IMPORT_C CSenIdentityProvider(TDescriptionClassType aType);
00377
00378
00379
00380
00381
00382
00393 IMPORT_C void ConstructL(const TDesC8& aEndPoint);
00394
00407 IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00408 const TDesC8& aContract);
00409
00425 IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00426 const TDesC8& aContract,
00427 const TDesC8& aProviderID);
00428
00448 IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00449 const TDesC8& aContract,
00450 const TDesC8& aProviderID,
00451 const TDesC8& aServiceID);
00452 };
00453
00454
00455 #endif
00456
00457