/[resiprocate]/main/sip/resiprocate/dum/ServerAuthManager.hxx
ViewVC logotype

Contents of /main/sip/resiprocate/dum/ServerAuthManager.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4601 - (show annotations) (download)
Thu May 12 01:10:49 2005 UTC (14 years, 6 months ago) by derek
File size: 3779 byte(s)
merged identity branch(4598) into main--removing identity branch after this
1 #if !defined(RESIP_SERVERAUTHMANAGER_HXX)
2 #define RESIP_SERVERAUTHMANAGER_HXX
3
4 #include <map>
5
6 #include "resiprocate/dum/UserProfile.hxx"
7 #include "resiprocate/Message.hxx"
8
9 namespace resip
10 {
11 class Profile;
12 class UserAuthInfo;
13 class DialogUsageManager;
14
15
16 class ServerAuthManager
17 {
18 public:
19 typedef enum Result
20 {
21 //Authorized,
22 RequestedCredentials,
23 Challenged,
24 Skipped,
25 Rejected
26 };
27
28 ServerAuthManager(DialogUsageManager& dum);
29 virtual ~ServerAuthManager();
30
31 // can return Authorized, Rejected or Skipped
32 //Result handleUserAuthInfo(Message* msg);
33
34 // returns the SipMessage that was authorized if succeeded or returns 0 if
35 // rejected.
36 SipMessage* handleUserAuthInfo(UserAuthInfo* auth);
37
38 // can return Challenged, RequestedCredentials, Rejected, Skipped
39 Result handle(const SipMessage& msg);
40
41 protected:
42 // this call back should async cause a post of UserAuthInfo
43 virtual void requestCredential(const Data& user,
44 const Data& realm,
45 const Data& transactionToken ) = 0;
46
47 virtual bool useAuthInt() const;
48
49 private:
50 DialogUsageManager& mDum;
51 typedef std::map<Data, SipMessage*> MessageMap;
52 MessageMap mMessages;
53
54 };
55
56
57 }
58
59 #endif
60
61 /* ====================================================================
62 * The Vovida Software License, Version 1.0
63 *
64 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
65 *
66 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions
68 * are met:
69 *
70 * 1. Redistributions of source code must retain the above copyright
71 * notice, this list of conditions and the following disclaimer.
72 *
73 * 2. Redistributions in binary form must reproduce the above copyright
74 * notice, this list of conditions and the following disclaimer in
75 * the documentation and/or other materials provided with the
76 * distribution.
77 *
78 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
79 * and "Vovida Open Communication Application Library (VOCAL)" must
80 * not be used to endorse or promote products derived from this
81 * software without prior written permission. For written
82 * permission, please contact vocal@vovida.org.
83 *
84 * 4. Products derived from this software may not be called "VOCAL", nor
85 * may "VOCAL" appear in their name, without prior written
86 * permission of Vovida Networks, Inc.
87 *
88 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
89 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
90 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
91 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
92 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
93 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
94 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
95 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
96 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
97 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
98 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
99 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
100 * DAMAGE.
101 *
102 * ====================================================================
103 *
104 * This software consists of voluntary contributions made by Vovida
105 * Networks, Inc. and many individuals on behalf of Vovida Networks,
106 * Inc. For more information on Vovida Networks, Inc., please see
107 * <http://www.vovida.org/>.
108 *
109 */

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27