SenWsSecurityHeader.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_HEADER_H
00024 #define SEN_WS_SECURITY_HEADER_H
00025 
00026 //  INCLUDES
00027 #include <SenBaseFragment.h>
00028 #include <SenSoapConstants.h>
00029 
00030 
00031 // FORWARD DECLARATIONS
00032 class CSenIdentityProvider;
00033 
00034 // CLASS DECLARATION
00035 
00042 class CSenWsSecurityHeader : public CSenBaseFragment
00043     {
00044     public:  // Constructors and destructor
00045 
00049         enum TPasswordType
00050             {
00051             EText = 1,        // default, wsse:PasswordText
00052             EDigest           // wsse:Digest
00053             };
00054 
00055         
00060         IMPORT_C static CSenWsSecurityHeader* NewL();
00061         
00067         IMPORT_C static CSenWsSecurityHeader* NewLC();
00068 
00069         
00075         IMPORT_C static CSenWsSecurityHeader* NewL(const TDesC8& aData);
00076 
00083         IMPORT_C static CSenWsSecurityHeader* NewLC(const TDesC8& aData);
00084         
00091         IMPORT_C static CSenWsSecurityHeader* NewL(const TDesC8& aData, const TDesC8& aSecurityNs);
00092 
00100         IMPORT_C static CSenWsSecurityHeader* NewLC(const TDesC8& aData, const TDesC8& aSecurityNs);
00101 
00105         IMPORT_C virtual ~CSenWsSecurityHeader();
00106 
00107         // New functions
00108     
00130         IMPORT_C HBufC8* UsernameTokenL(CSenIdentityProvider &aIdentityProvider);
00131 
00166         IMPORT_C HBufC8* UsernameTokenL(CSenIdentityProvider &aIdentityProvider,
00167                                         CSenWsSecurityHeader::TPasswordType aType);
00168 
00169         // Static methods:
00170 
00182         IMPORT_C static TInt UsernameTokenL(const TDesC8& aUsername,
00183                                             HBufC8*& aToken);
00184 
00199         IMPORT_C static TInt UsernameTokenL(const TDesC8& aUsername,
00200                                             const TDesC8& aPassword,
00201                                             HBufC8*& aToken);
00202 
00231         IMPORT_C static TInt UsernameTokenL(const TDesC8& aUsername,
00232                                             const TDesC8& aPassword,
00233                                             CSenWsSecurityHeader::TPasswordType aType,
00234                                             HBufC8*& aToken);
00235 
00236 
00247         IMPORT_C static TInt BinarySecurityTokenL(const TDesC8& aContent,
00248                                                   HBufC8*& aToken);
00260         IMPORT_C static TInt BinarySecurityTokenL(const TDesC8& aContent,
00261                                                   const TDesC8& aValueType,
00262                                                   HBufC8*& aToken);
00263 
00280         IMPORT_C static TInt TimestampL(const TDesC8& aCreated, const TDesC8& aExpires, HBufC8*& aTimestamp);
00281         
00296         IMPORT_C static TInt TimestampL(const TDesC8& aCreated, HBufC8*& aTimestamp);
00297 
00313 //        IMPORT_C static TInt SecurityTokenReferenceL(const TDesC8& aURI, HBufC8*& aSTR); 
00314 
00315        
00316         // Virtual methods: 
00317 
00323         IMPORT_C virtual TPtrC8 XmlNs();
00324         
00331         IMPORT_C virtual TPtrC8 XmlNsPrefix();    
00332         
00333     protected:  
00334         
00338         IMPORT_C CSenWsSecurityHeader();
00339         
00343         IMPORT_C void BaseConstructL();
00344         
00345         // Functions from base classes
00346         
00353         IMPORT_C void BaseConstructL(const TDesC8& aData);
00354         IMPORT_C void BaseConstructL(const TDesC8& aData, const TDesC8& aSecurityNs);
00355     };
00356 
00357 #endif // SEN_WS_SECURITY_HEADER_H
00358 
00359 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top