reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
WsCookieAuthManager.hxx
Go to the documentation of this file.
1#if !defined(RESIP_WSCOOKIEAUTHMANAGER_HXX)
2#define RESIP_WSCOOKIEAUTHMANAGER_HXX
3
4#include <map>
5#include <set>
6
8#include "DumFeature.hxx"
11
12namespace resip
13{
14class DialogUsageManager;
15
17{
18 public:
25
27 virtual ~WsCookieAuthManager();
28
29 virtual ProcessingResult process(Message* msg);
30
31 protected:
32
33 // can return Authorized, Rejected, Skipped
34 virtual Result handle(SipMessage* sipMsg);
35
37 bool cookieUriMatch(const resip::Uri &first, const resip::Uri &second);
38
40 bool authorizedForThisIdentity(const MethodTypes method, const WsCookieContext &wsCookieContext, const resip::Uri &fromUri, const resip::Uri &toUri);
41
44 virtual bool requiresAuthorization(const SipMessage& msg);
45};
46
47
48}
49
50#endif
51
52
53/* ====================================================================
54 * BSD License
55 *
56 * Copyright (c) 2013 Catalin Constantin Usurelu All rights reserved.
57 *
58 * Redistribution and use in source and binary forms, with or without
59 * modification, are permitted provided that the following conditions
60 * are met:
61 *
62 * 1. Redistributions of source code must retain the above copyright
63 * notice, this list of conditions and the following disclaimer.
64 *
65 * 2. Redistributions in binary form must reproduce the above copyright
66 * notice, this list of conditions and the following disclaimer in
67 * the documentation and/or other materials provided with the
68 * distribution.
69 *
70 * 3. Neither the name of the author(s) nor the names of any contributors
71 * may be used to endorse or promote products derived from this software
72 * without specific prior written permission.
73 *
74 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
75 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
76 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
77 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
78 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
79 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
80 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
81 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
82 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
83 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
84 * SUCH DAMAGE.
85 *
86 * ====================================================================
87 *
88 */
The base-class used for message-passing.
Definition Message.hxx:21
Represents a SIP message.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
virtual bool requiresAuthorization(const SipMessage &msg)
should return true if the request must be challenged The default is to challenge all requests - overr...
bool cookieUriMatch(const resip::Uri &first, const resip::Uri &second)
compares URI user and host, allows wildcards in first URI
bool authorizedForThisIdentity(const MethodTypes method, const WsCookieContext &wsCookieContext, const resip::Uri &fromUri, const resip::Uri &toUri)
should return true if the passed in user is authorized for the provided uri
virtual Result handle(SipMessage *sipMsg)
virtual ProcessingResult process(Message *msg)
dcm! – add UnusedChecking(_enum) below;