12#define RESIPROCATE_SUBSYSTEM Subsystem::DUM
24 InfoLog(<<
"~WsCookieAuthManager");
39 switch (
handle(sipMessage) )
42 InfoLog(<<
"WsCookieAuth rejected request " << sipMessage->
brief());
79 DebugLog(<<
"Matched cookie source URI field" << wsFromUri <<
" against request From header field URI " << fromUri);
88 DebugLog(<<
"Matched cookie destination URI field" << wsDestUri <<
" against request To header field URI " << toUri);
116 sipMessage->
header(h_From).isAllContacts() )
118 InfoLog(<<
"Malformed From header: cannot verify against cookie. Rejecting.");
119 auto response = std::make_shared<SipMessage>();
134 auto response = std::make_shared<SipMessage>();
146 auto response = std::make_shared<SipMessage>();
152 InfoLog(<<
"Skipping some message that we didn't explicitly handle");
#define WarningLog(args_)
void send(std::shared_ptr< SipMessage > request)
DialogUsageManager & mDum
static void makeResponse(SipMessage &response, const SipMessage &request, int responseCode, const Data &reason=Data::Empty, const Data &hostname=Data::Empty, const Data &warning=Data::Empty)
Make a response to a provided request.
bool isWellFormed() const
Returns true iff this element was parsed successfully, according to the implementation of parse().
The base-class used for message-passing.
virtual Brief brief() const
return a facet for brief encoding of message
Represents a SIP message.
bool isRequest() const
Returns true if message is a request, false otherwise.
const Tuple & getReceivedTransportTuple() const
const RequestLine & header(const RequestLineType &l) const
Returns the RequestLine. This is only valid for request messages.
std::shared_ptr< WsCookieContext > getWsCookieContext() const noexcept
bool isMyDomain(const Data &domain) const
Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
TransportType getType() const
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
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
WsCookieAuthManager(DialogUsageManager &dum, TargetCommand::Target &target)
virtual Result handle(SipMessage *sipMsg)
virtual ProcessingResult process(Message *msg)
virtual ~WsCookieAuthManager()
time_t getExpiresTime() const
dcm! – add UnusedChecking(_enum) below;
bool isEqualNoCase(const Data &left, const Data &right)
bool isWebSocket(TransportType type)
Returns true if passed in transport type is a WebSocket transport protocol.
RequestLineType h_RequestLine