reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
CookieAuthenticator.hxx
Go to the documentation of this file.
1#if !defined(RESIP_COOKIE_AUTHENTICATOR_HXX)
2#define RESIP_COOKIE_AUTHENTICATOR_HXX
3
4#include "rutil/Data.hxx"
5#include "repro/Processor.hxx"
10
11using namespace resip;
12
13namespace repro
14{
16 {
17 public:
18
19 CookieAuthenticator(const Data& wsCookieAuthSharedSecret, const Data& wsCookieExtraHeaderName, resip::SipStack* stack);
21
23 virtual void dump(EncodeStream &os) const;
24
25 protected:
26 std::unique_ptr<resip::ExtensionHeader> mWsCookieExtraHeader;
27
28 bool cookieUriMatch(const resip::Uri &first, const resip::Uri &second);
29 bool authorizedForThisIdentity(const MethodTypes method, const WsCookieContext& wsCookieContext, resip::Uri &fromUri, resip::Uri &toUri);
30 };
31
32}
33#endif
34
35
36/* ====================================================================
37 * BSD License
38 *
39 * Copyright (c) 2013 Catalin Constantin Usurelu All rights reserved.
40 *
41 * Redistribution and use in source and binary forms, with or without
42 * modification, are permitted provided that the following conditions
43 * are met:
44 *
45 * 1. Redistributions of source code must retain the above copyright
46 * notice, this list of conditions and the following disclaimer.
47 *
48 * 2. Redistributions in binary form must reproduce the above copyright
49 * notice, this list of conditions and the following disclaimer in
50 * the documentation and/or other materials provided with the
51 * distribution.
52 *
53 * 3. Neither the name of the author(s) nor the names of any contributors
54 * may be used to endorse or promote products derived from this software
55 * without specific prior written permission.
56 *
57 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
58 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
59 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
60 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
61 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
62 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
63 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
64 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
65 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
66 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
67 * SUCH DAMAGE.
68 *
69 * ====================================================================
70 *
71 */
virtual void dump(EncodeStream &os) const
bool cookieUriMatch(const resip::Uri &first, const resip::Uri &second)
virtual processor_action_t process(RequestContext &)
std::unique_ptr< resip::ExtensionHeader > mWsCookieExtraHeader
bool authorizedForThisIdentity(const MethodTypes method, const WsCookieContext &wsCookieContext, resip::Uri &fromUri, resip::Uri &toUri)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
This is the primary point of interaction between the app-layer and the stack.
Definition SipStack.hxx:160
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
#define EncodeStream