reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ReproRADIUSServerAuthManager.cxx
Go to the documentation of this file.
1#include "rutil/ResipAssert.h"
2
3#if defined(HAVE_CONFIG_H)
4 #include "config.h"
5#endif
6
7#include "rutil/AsyncBool.hxx"
12#include "repro/UserStore.hxx"
13#include "repro/AclStore.hxx"
14
15#ifdef USE_RADIUS_CLIENT
16
17#define RESIPROCATE_SUBSYSTEM Subsystem::REPRO
18
19using namespace resip;
20using namespace repro;
21
22
23ReproRADIUSServerAuthManager::ReproRADIUSServerAuthManager(DialogUsageManager& dum,
25 bool useAuthInt,
26 bool rejectBadNonces,
29 const Data& staticRealm,
30 const std::vector<DigestType>& challengeDigestTypes):
32 mAclDb(aclDb),
33 mUseAuthInt(useAuthInt),
34 mRejectBadNonces(rejectBadNonces)
35{
36}
37
38ReproRADIUSServerAuthManager::~ReproRADIUSServerAuthManager()
39{
40}
41
42bool
43ReproRADIUSServerAuthManager::useAuthInt() const
44{
45 return mUseAuthInt;
46}
47
48bool
49ReproRADIUSServerAuthManager::rejectBadNonces() const
50{
51 return mRejectBadNonces;
52}
53
55ReproRADIUSServerAuthManager::requiresChallenge(const SipMessage& msg)
56{
58 if(!mAclDb.isRequestTrusted(msg))
59 {
60 return ServerAuthManager::requiresChallenge(msg);
61 }
62 else
63 {
64 return False;
65 }
66}
67
68#endif
69
70/* ====================================================================
71 *
72 * Copyright (c) 2026 SIP Spectrum, Inc. https://www.sipspectrum.com
73 * Copyright 2013 Daniel Pocock http://danielpocock.com
74 * All rights reserved.
75 *
76 * Redistribution and use in source and binary forms, with or without
77 * modification, are permitted provided that the following conditions
78 * are met:
79 *
80 * 1. Redistributions of source code must retain the above copyright
81 * notice, this list of conditions and the following disclaimer.
82 *
83 * 2. Redistributions in binary form must reproduce the above copyright
84 * notice, this list of conditions and the following disclaimer in
85 * the documentation and/or other materials provided with the
86 * distribution.
87 *
88 * 3. Neither the name of the author(s) nor the names of any contributors
89 * may be used to endorse or promote products derived from this software
90 * without specific prior written permission.
91 *
92 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
93 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
94 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
95 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
96 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
97 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
98 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
99 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
100 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
101 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
102 * SUCH DAMAGE.
103 *
104 * ====================================================================
105 *
106 *
107 */
108
#define resip_assert(x)
This file needs to work for both C and C++ code.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents a SIP message.
bool isRequest() const
Returns true if message is a request, false otherwise.
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66