reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
UserAgentServerAuthManager.hxx
Go to the documentation of this file.
1#if !defined(UserAgentServerAuthManager_hxx)
2#define UserAgentServerAuthManager_hxx
3
4#include <map>
5
6#include <rutil/AsyncBool.hxx>
11
12namespace recon
13{
14class UserAgent;
15
29{
30 public:
33
34 protected:
35 // this call back should async cause a post of UserAuthInfo
36 virtual void requestCredential(const resip::Data& user,
37 const resip::Data& realm,
38 const resip::SipMessage& msg,
39 const resip::Auth& auth,
40 const resip::Data& transactionId );
41
42 virtual bool useAuthInt() const;
43 virtual bool proxyAuthenticationMode() const;
44 virtual const resip::Data& getChallengeRealm(const resip::SipMessage& msg);
45 virtual bool isMyRealm(const resip::Data& realm);
46 virtual bool authorizedForThisIdentity(const resip::Data &user,
47 const resip::Data &realm,
50
51 private:
52 UserAgent& mUserAgent;
53};
54
55}
56
57#endif
58
59
60/* ====================================================================
61
62 Copyright (c) 2007-2008, Plantronics, Inc.
63 All rights reserved.
64
65 Redistribution and use in source and binary forms, with or without
66 modification, are permitted provided that the following conditions are
67 met:
68
69 1. Redistributions of source code must retain the above copyright
70 notice, this list of conditions and the following disclaimer.
71
72 2. Redistributions in binary form must reproduce the above copyright
73 notice, this list of conditions and the following disclaimer in the
74 documentation and/or other materials provided with the distribution.
75
76 3. Neither the name of Plantronics nor the names of its contributors
77 may be used to endorse or promote products derived from this
78 software without specific prior written permission.
79
80 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
81 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
82 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
83 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
84 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
85 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
86 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
87 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
88 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
89 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
90 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
91
92 ==================================================================== */
This class is used to provide server digest authentication capabilities.
virtual bool isMyRealm(const resip::Data &realm)
should return true if realm passed in is ours and we can challenge
virtual const resip::Data & getChallengeRealm(const resip::SipMessage &msg)
returns the realm to be used for the challenge
virtual bool authorizedForThisIdentity(const resip::Data &user, const resip::Data &realm, resip::Uri &fromUri)
should return true if the passed in user is authorized for the provided uri
virtual resip::AsyncBool requiresChallenge(const resip::SipMessage &msg)
should return true if the request must be challenged The default is to challenge all requests - overr...
virtual void requestCredential(const resip::Data &user, const resip::Data &realm, const resip::SipMessage &msg, const resip::Auth &auth, const resip::Data &transactionId)
This class is one of two main classes of concern to an application using the UserAgent library.
Definition UserAgent.hxx:56
Represents the "credentials" and "challenge" elements in the SIP grammar.
Definition Auth.hxx:18
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents a SIP message.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
void list()
Definition userAdmin.cxx:66