reSIProcate/DialogUsageManager  9680
ClientAuthExtension.hxx
Go to the documentation of this file.
00001 #if !defined(CLIENT_AUTH_EXTENSION_HXX)
00002 #define CLIENT_AUTH_EXTENSION_HXX
00003 
00004 #include <time.h>
00005 
00006 #include <time.h>
00007 
00008 #include "resip/stack/NonceHelper.hxx"
00009 #include "resip/stack/Symbols.hxx"
00010 #include "resip/stack/Uri.hxx"
00011 #include "resip/stack/MethodTypes.hxx"
00012 #include "rutil/BaseException.hxx"
00013 #include "rutil/Data.hxx"
00014 #include "resip/stack/Contents.hxx"
00015 #include "resip/stack/SecurityAttributes.hxx"
00016 
00017 namespace resip
00018 {
00019 
00020 class SipMessage;
00021 class NameAddr;
00022 class SecurityAttributes;
00023 class Security;
00024 
00025 class ClientAuthExtension
00026 {
00027    public:
00028       virtual ~ClientAuthExtension() {}
00029       virtual void makeChallengeResponseAuth(const SipMessage& request,
00030                                              const Data& username,
00031                                              const Data& password,
00032                                              const Auth& challenge,
00033                                              const Data& cnonce,
00034                                              const Data& authQop,
00035                                              const Data& nonceCountString,
00036                                              Auth& auth);      
00037       virtual void makeChallengeResponseAuthWithA1(const SipMessage& request,
00038                                                    const Data& username,
00039                                                    const Data& passwordHashA1,
00040                                                    const Auth& challenge,
00041                                                    const Data& cnonce,
00042                                                    const Data& authQop,
00043                                                    const Data& nonceCountString,
00044                                                    Auth& auth);      
00045       
00046       virtual bool algorithmAndQopSupported(const Auth& challenge);
00047 
00048       static void setInstance(std::auto_ptr<ClientAuthExtension> ext);
00049       static ClientAuthExtension& instance() 
00050       {
00051          return *mInstance;
00052       }      
00053    protected:
00054       ClientAuthExtension() {}
00055 
00056       
00057       static std::auto_ptr<ClientAuthExtension> mInstance;
00058       
00059 };
00060 
00061 }
00062 
00063 #endif
00064 
00065 /* ====================================================================
00066  * The Vovida Software License, Version 1.0 
00067  * 
00068  * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
00069  * 
00070  * Redistribution and use in source and binary forms, with or without
00071  * modification, are permitted provided that the following conditions
00072  * are met:
00073  * 
00074  * 1. Redistributions of source code must retain the above copyright
00075  *    notice, this list of conditions and the following disclaimer.
00076  * 
00077  * 2. Redistributions in binary form must reproduce the above copyright
00078  *    notice, this list of conditions and the following disclaimer in
00079  *    the documentation and/or other materials provided with the
00080  *    distribution.
00081  * 
00082  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
00083  *    and "Vovida Open Communication Application Library (VOCAL)" must
00084  *    not be used to endorse or promote products derived from this
00085  *    software without prior written permission. For written
00086  *    permission, please contact vocal@vovida.org.
00087  *
00088  * 4. Products derived from this software may not be called "VOCAL", nor
00089  *    may "VOCAL" appear in their name, without prior written
00090  *    permission of Vovida Networks, Inc.
00091  * 
00092  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
00093  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00094  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
00095  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
00096  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
00097  * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
00098  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00099  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00100  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00101  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00102  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00103  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00104  * DAMAGE.
00105  * 
00106  * ====================================================================
00107  * 
00108  * This software consists of voluntary contributions made by Vovida
00109  * Networks, Inc. and many individuals on behalf of Vovida Networks,
00110  * Inc.  For more information on Vovida Networks, Inc., please see
00111  * <http://www.vovida.org/>.
00112  *
00113  */