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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10848 - (show annotations) (download)
Sun Jan 12 10:43:21 2014 UTC (5 years, 10 months ago) by Dpocock
File size: 3423 byte(s)
resip/dum: add support for statically configured auth realm
1
2 #ifndef __RADIUSServerAuthManager_h
3 #define __RADIUSServerAuthManager_h
4
5 #ifdef HAVE_CONFIG_H
6 #include "config.h"
7 #endif
8
9 #ifdef USE_RADIUS_CLIENT
10
11 #include "rutil/RADIUSDigestAuthenticator.hxx"
12 #include "resip/dum/ServerAuthManager.hxx"
13
14 namespace resip
15 {
16
17 class RADIUSServerAuthManager : public resip::ServerAuthManager
18 {
19 private:
20 resip::DialogUsageManager& dum;
21
22 public:
23 RADIUSServerAuthManager(resip::DialogUsageManager& dum,
24 TargetCommand::Target& target,
25 const Data& configurationFile,
26 bool challengeThirdParties = true,
27 const Data& staticRealm = "");
28 virtual ~RADIUSServerAuthManager();
29
30 protected:
31 void requestCredential(const resip::Data& user, const resip::Data& realm,
32 const resip::SipMessage& msg, const resip::Auth& auth,
33 const resip::Data& transactionId);
34 bool useAuthInt() const;
35
36 void onAuthSuccess(const resip::SipMessage& msg);
37 void onAuthFailure(resip::ServerAuthManager::AuthFailureReason reason, const resip::SipMessage& msg);
38 };
39
40 class MyRADIUSDigestAuthListener : public RADIUSDigestAuthListener
41 {
42 private:
43 resip::Data user;
44 resip::Data realm;
45 resip::TransactionUser& tu;
46 resip::Data transactionId;
47 public:
48 MyRADIUSDigestAuthListener(const resip::Data& user, const resip::Data& realm,
49 resip::TransactionUser& tu, const resip::Data& transactionId);
50 virtual ~MyRADIUSDigestAuthListener();
51 void onSuccess(const resip::Data& rpid);
52 void onAccessDenied();
53 void onError();
54 };
55
56 }
57
58 #endif
59
60 #endif
61
62 /* ====================================================================
63 *
64 * Copyright 2008-2013 Daniel Pocock http://danielpocock.com
65 * All rights reserved.
66 *
67 * Redistribution and use in source and binary forms, with or without
68 * modification, are permitted provided that the following conditions
69 * are met:
70 *
71 * 1. Redistributions of source code must retain the above copyright
72 * notice, this list of conditions and the following disclaimer.
73 *
74 * 2. Redistributions in binary form must reproduce the above copyright
75 * notice, this list of conditions and the following disclaimer in
76 * the documentation and/or other materials provided with the
77 * distribution.
78 *
79 * 3. Neither the name of the author(s) nor the names of any contributors
80 * may be used to endorse or promote products derived from this software
81 * without specific prior written permission.
82 *
83 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
84 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
85 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
86 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
87 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
88 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
89 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
90 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
91 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
92 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
93 * SUCH DAMAGE.
94 *
95 * ====================================================================
96 *
97 *
98 */
99

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27