SenWsSecurityHeader2.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SenWsSecurityHeader.h
00004 *  Part of     : Web Services Framework / Utils
00005 *  Interface   : 
00006 *  Description : CSenWsSecurityHeader represents security header functionality
00007 *                according to oasis wss spesifications (2004/01)
00008 *  Version     :
00009 *
00010 *  Copyright © 2002-2005 Nokia. All rights reserved.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia. All rights are reserved. Copying, including 
00014 *  reproducing, storing, adapting or translating, any 
00015 *  or all of this material requires the prior written consent of 
00016 *  Nokia. This material also contains confidential 
00017 *  information which may not be disclosed to others without the 
00018 *  prior written consent of Nokia.
00019 * ==============================================================================
00020 */
00021 
00022 
00023 #ifndef SEN_WS_SECURITY_HEADER2_H
00024 #define SEN_WS_SECURITY_HEADER2_H
00025 
00026 //  INCLUDES
00027 #include <SenFragmentBase.h>
00028 #include <SenSoapConstants.h>
00029 
00030 // FORWARD DECLARATIONS
00031 class CSenIdentityProvider;
00032 
00033 // CLASS DECLARATION
00034 
00041 class CSenWsSecurityHeader2 : public CSenFragmentBase
00042     {
00043     public:  // Constructors and destructor
00044 
00048         enum TPasswordType
00049             {
00050             EText = 1,        // default, wsse:PasswordText
00051             EDigest           // wsse:Digest
00052             };
00053 
00054         
00062         IMPORT_C static CSenWsSecurityHeader2* NewL(RSenDocument aDocument,
00063                                                     TXmlEngElement aElement);
00064         
00073         IMPORT_C static CSenWsSecurityHeader2* NewLC(RSenDocument aDocument,
00074                                                      TXmlEngElement aElement);
00075         
00084         IMPORT_C static CSenWsSecurityHeader2* NewL(const TDesC8& aData,
00085                                                     RSenDocument aDocument,
00086                                                     TXmlEngElement aElement);
00087 
00097         IMPORT_C static CSenWsSecurityHeader2* NewLC(const TDesC8& aData,
00098                                                      RSenDocument aDocument,
00099                                                      TXmlEngElement aElement);
00100 
00110         IMPORT_C static CSenWsSecurityHeader2* NewL(const TDesC8& aData,
00111                                                     const TDesC8& aSecurityNs,
00112                                                     RSenDocument aDocument,
00113                                                     TXmlEngElement aElement);
00114 
00125         IMPORT_C static CSenWsSecurityHeader2* NewLC(const TDesC8& aData,
00126                                                      const TDesC8& aSecurityNs,
00127                                                      RSenDocument aDocument,
00128                                                      TXmlEngElement aElement);
00129 
00133         IMPORT_C virtual ~CSenWsSecurityHeader2();
00134 
00135         // New functions
00136     
00158         IMPORT_C HBufC8* UsernameTokenL(CSenIdentityProvider &aIdentityProvider);
00159 
00194         IMPORT_C HBufC8* UsernameTokenL(CSenIdentityProvider &aIdentityProvider,
00195                                         CSenWsSecurityHeader2::TPasswordType aType);
00196 
00197         // Static methods:
00198 
00210         IMPORT_C static TInt UsernameTokenL(const TDesC8& aUsername,
00211                                             HBufC8*& aToken);
00212 
00227         IMPORT_C static TInt UsernameTokenL(const TDesC8& aUsername,
00228                                             const TDesC8& aPassword,
00229                                             HBufC8*& aToken);
00230 
00259         IMPORT_C static TInt UsernameTokenL(const TDesC8& aUsername,
00260                                             const TDesC8& aPassword,
00261                                             CSenWsSecurityHeader2::TPasswordType aType,
00262                                             HBufC8*& aToken);
00263 
00264 
00281         IMPORT_C static TInt TimestampL(const TDesC8& aCreated, const TDesC8& aExpires, HBufC8*& aTimestamp);
00282         
00297         IMPORT_C static TInt TimestampL(const TDesC8& aCreated, HBufC8*& aTimestamp);
00298 
00314 //        IMPORT_C static TInt SecurityTokenReferenceL(const TDesC8& aURI, HBufC8*& aSTR); 
00315 
00316        
00317         // Virtual methods: 
00318 
00324         IMPORT_C virtual TPtrC8 XmlNs();
00325         
00332         IMPORT_C virtual TPtrC8 XmlNsPrefix();    
00333         
00334     protected:  
00335         
00339         IMPORT_C CSenWsSecurityHeader2();
00340         
00344         IMPORT_C void BaseConstructL(RSenDocument aDocument,
00345                                      TXmlEngElement aElement);
00346         
00347         // Functions from base classes
00348         
00358         IMPORT_C void BaseConstructL(const TDesC8& aData,
00359                                      RSenDocument aDocument,
00360                                      TXmlEngElement aElement);
00361                                      
00372         IMPORT_C void BaseConstructL(const TDesC8& aData,
00373                                      const TDesC8& aSecurityNs,
00374                                      RSenDocument aDocument,
00375                                      TXmlEngElement aElement);
00376     };
00377 
00378 #endif // SEN_WS_SECURITY_HEADER2_H
00379 
00380 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top