/[resiprocate]/main/resip/dum/ClientAuthExtension.hxx
ViewVC logotype

Contents of /main/resip/dum/ClientAuthExtension.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9038 - (show annotations) (download)
Sun Feb 27 20:22:45 2011 UTC (8 years, 8 months ago) by sgodin
File size: 4468 byte(s)
-allow a DUM application to optionally provide a MD5 A1 Hash of a users password, instead 
 of the clear text version
  Note:  If the A1 hash is provided then the realm provided MUST match the realm in the 
         challenge or authentication will fail.  If the plain text password is provided, 
         then we will form the A1 hash using the realm from the challenge.

1 #if !defined(CLIENT_AUTH_EXTENSION_HXX)
2 #define CLIENT_AUTH_EXTENSION_HXX
3
4 #include <time.h>
5
6 #include <time.h>
7
8 #include "resip/stack/NonceHelper.hxx"
9 #include "resip/stack/Symbols.hxx"
10 #include "resip/stack/Uri.hxx"
11 #include "resip/stack/MethodTypes.hxx"
12 #include "rutil/BaseException.hxx"
13 #include "rutil/Data.hxx"
14 #include "resip/stack/Contents.hxx"
15 #include "resip/stack/SecurityAttributes.hxx"
16
17 namespace resip
18 {
19
20 class SipMessage;
21 class NameAddr;
22 class SecurityAttributes;
23 class Security;
24
25 class ClientAuthExtension
26 {
27 public:
28 virtual ~ClientAuthExtension() {}
29 virtual void makeChallengeResponseAuth(const SipMessage& request,
30 const Data& username,
31 const Data& password,
32 const Auth& challenge,
33 const Data& cnonce,
34 const Data& authQop,
35 const Data& nonceCountString,
36 Auth& auth);
37 virtual void makeChallengeResponseAuthWithA1(const SipMessage& request,
38 const Data& username,
39 const Data& passwordHashA1,
40 const Auth& challenge,
41 const Data& cnonce,
42 const Data& authQop,
43 const Data& nonceCountString,
44 Auth& auth);
45
46 virtual bool algorithmAndQopSupported(const Auth& challenge);
47
48 static void setInstance(std::auto_ptr<ClientAuthExtension> ext);
49 static ClientAuthExtension& instance()
50 {
51 return *mInstance;
52 }
53 protected:
54 ClientAuthExtension() {}
55
56
57 static std::auto_ptr<ClientAuthExtension> mInstance;
58
59 };
60
61 }
62
63 #endif
64
65 /* ====================================================================
66 * The Vovida Software License, Version 1.0
67 *
68 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
69 *
70 * Redistribution and use in source and binary forms, with or without
71 * modification, are permitted provided that the following conditions
72 * are met:
73 *
74 * 1. Redistributions of source code must retain the above copyright
75 * notice, this list of conditions and the following disclaimer.
76 *
77 * 2. Redistributions in binary form must reproduce the above copyright
78 * notice, this list of conditions and the following disclaimer in
79 * the documentation and/or other materials provided with the
80 * distribution.
81 *
82 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
83 * and "Vovida Open Communication Application Library (VOCAL)" must
84 * not be used to endorse or promote products derived from this
85 * software without prior written permission. For written
86 * permission, please contact vocal@vovida.org.
87 *
88 * 4. Products derived from this software may not be called "VOCAL", nor
89 * may "VOCAL" appear in their name, without prior written
90 * permission of Vovida Networks, Inc.
91 *
92 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
93 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
94 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
95 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
96 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
97 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
98 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
99 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
100 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
101 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
102 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
103 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
104 * DAMAGE.
105 *
106 * ====================================================================
107 *
108 * This software consists of voluntary contributions made by Vovida
109 * Networks, Inc. and many individuals on behalf of Vovida Networks,
110 * Inc. For more information on Vovida Networks, Inc., please see
111 * <http://www.vovida.org/>.
112 *
113 */

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27