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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9407 - (show annotations) (download)
Fri Feb 17 17:22:52 2012 UTC (7 years, 8 months ago) by sgodin
File MIME type: text/plain
File size: 4341 byte(s)
Cleaned up the MySQL database store implementation for repro, it is now in a deployable state

-allow MySQL connection parameters to be specified in repro config
-cleaned up MySQL initialization, so we fail to start if there is a db connect error
-remove all generic throws from MySQL implementation
-implemented MySQL connection recovery on errors 
  - when connection errors occur on query, try to re-connect immediately (once)
-made the number of worker threads in the repro authgrabber dispatcher configurable via the repro configuration file
-optimized query building in MySQLDb class
-added ability for repro.config to provide a select statement that allows a1 password retrieval from an
 arbitrary database table on the MySQL server
-modified UserAuthGrabber to use UserStore::getUserAuthInfo, instead of UserStore::getUserInfo API - we don't
 use the other fields retrieved, so this will provide an optimization
-modified repro so that Registration authentication uses the same pool of
 worker threads that the DigestAuthenticator uses when looking up
 credentials from the database.  Previously only auth look ups for 
 non-REGISTER requests (ie. INVITE, SUBSCRIBE, etc.) would be done 
 in a manner that didn't block inbound message processing.  A 
 lengthy auth check for a REGISTER request would cause delays in 
 processing all other REGISTER requests. 
-added a new method to SipStack so that you can post to TU without
 needing to clone/copy the message 
-optimized the Worker thread to avoid making a copy of the Message when
 posting to the stack 
-added .sql script to create repro tables on MySQL
-modified configure script to allow enabling of MySQL support in repro.  
 Note:  berkeley-db4 support is always enabled so removed REPRO_DB option 
 from configure.  If MySQL is enabled, then either BerkeleyDb or MySQL can 
 be used, depending on the settings in repro.config

Other Misc Changes
-set SVN eol-style to native - for ConfigParse class
-added missing command to help text of reprocmd 






1 #if !defined(RESIP_USER_AUTH_INFO_HXX)
2 #define RESIP_USER_AUTH_INFO_HXX
3
4 #include "rutil/Data.hxx"
5 #include "resip/dum/DumFeatureMessage.hxx"
6
7 namespace resip
8 {
9
10 class UserAuthInfo : public resip::DumFeatureMessage
11 {
12 public:
13
14 enum InfoMode
15 {
16 UserUnknown, // the user/realm is not known
17 RetrievedA1, // the A1 string has been retrieved
18 Stale, // the nonce is stale, challenge again
19 DigestAccepted, // the digest was accepted, no A1 returned
20 DigestNotAccepted, // the digest was wrong, challenge again/deny
21 Error // some error occurred
22 };
23
24 UserAuthInfo( const resip::Data& user,
25 const resip::Data& realm,
26 InfoMode mode,
27 const resip::Data& transactionId);
28
29 UserAuthInfo( const resip::Data& user,
30 const resip::Data& realm,
31 const resip::Data& a1,
32 const resip::Data& transactionId);
33
34 UserAuthInfo( const resip::Data& user,
35 const resip::Data& realm,
36 const resip::Data& transactionId,
37 resip::TransactionUser* transactionUser);
38 ~UserAuthInfo();
39
40 InfoMode getMode() const;
41
42 // returns a blank Data("") if (mode != RetrievedA1)
43 const resip::Data& getA1() const;
44 const resip::Data& getRealm() const;
45 const resip::Data& getUser() const;
46
47 void setMode(InfoMode mode);
48 void setA1(const resip::Data& a1);
49
50 virtual resip::Data brief() const;
51 virtual resip::Message* clone() const;
52
53 virtual EncodeStream& encode(EncodeStream& strm) const;
54 virtual EncodeStream& encodeBrief(EncodeStream& strm) const;
55
56 private:
57 InfoMode mMode;
58 resip::Data mUser;
59 resip::Data mRealm;
60 resip::Data mA1;
61 };
62
63 EncodeStream&
64 operator<<(EncodeStream& strm, const UserAuthInfo& msg);
65
66 }
67 #endif
68
69 /* ====================================================================
70 * The Vovida Software License, Version 1.0
71 *
72 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
73 *
74 * Redistribution and use in source and binary forms, with or without
75 * modification, are permitted provided that the following conditions
76 * are met:
77 *
78 * 1. Redistributions of source code must retain the above copyright
79 * notice, this list of conditions and the following disclaimer.
80 *
81 * 2. Redistributions in binary form must reproduce the above copyright
82 * notice, this list of conditions and the following disclaimer in
83 * the documentation and/or other materials provided with the
84 * distribution.
85 *
86 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
87 * and "Vovida Open Communication Application Library (VOCAL)" must
88 * not be used to endorse or promote products derived from this
89 * software without prior written permission. For written
90 * permission, please contact vocal@vovida.org.
91 *
92 * 4. Products derived from this software may not be called "VOCAL", nor
93 * may "VOCAL" appear in their name, without prior written
94 * permission of Vovida Networks, Inc.
95 *
96 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
97 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
98 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
99 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
100 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
101 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
102 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
103 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
104 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
105 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
106 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
107 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
108 * DAMAGE.
109 *
110 * ====================================================================
111 *
112 * This software consists of voluntary contributions made by Vovida
113 * Networks, Inc. and many individuals on behalf of Vovida Networks,
114 * Inc. For more information on Vovida Networks, Inc., please see
115 * <http://www.vovida.org/>.
116 *
117 */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27