reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
recon::UserAgentServerAuthManager Class Reference

This class is used to provide server digest authentication capabilities. More...

#include <UserAgentServerAuthManager.hxx>

Inheritance diagram for recon::UserAgentServerAuthManager:
[legend]

Public Member Functions

 UserAgentServerAuthManager (UserAgent &userAgent)
 
 ~UserAgentServerAuthManager ()
 
- Public Member Functions inherited from resip::ServerAuthManager
 ServerAuthManager (DialogUsageManager &dum, TargetCommand::Target &target, bool challengeThirdParties=true, const resip::Data &staticRealm="", const std::vector< DigestType > &challengeDigestTypes=std::vector< DigestType >())
 
virtual ~ServerAuthManager ()
 
virtual ProcessingResult process (Message *msg)
 
virtual SipMessage * handleUserAuthInfo (UserAuthInfo *auth)
 
virtual Result handle (SipMessage *sipMsg)
 
- Public Member Functions inherited from resip::DumFeature
 DumFeature (DialogUsageManager &dum, TargetCommand::Target &target)
 
virtual ~DumFeature ()
 
virtual void postCommand (std::unique_ptr< Message > message)
 

Protected Member Functions

virtual void requestCredential (const resip::Data &user, const resip::Data &realm, const resip::SipMessage &msg, const resip::Auth &auth, const resip::Data &transactionId)
 
virtual bool useAuthInt () const
 
virtual bool proxyAuthenticationMode () const
 
virtual const resip::Data & getChallengeRealm (const resip::SipMessage &msg)
 returns the realm to be used for the challenge
 
virtual bool isMyRealm (const resip::Data &realm)
 should return true if realm passed in is ours and we can 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 - override this class to change this beviour
 
- Protected Member Functions inherited from resip::ServerAuthManager
virtual bool rejectBadNonces () const
 
Result issueChallengeIfRequired (SipMessage *sipMsg)
 
void issueChallenge (SipMessage *sipMsg, bool stale=false)
 
virtual void onAuthSuccess (const SipMessage &msg)
 
virtual void onAuthFailure (AuthFailureReason reason, const SipMessage &msg)
 

Additional Inherited Members

- Public Types inherited from resip::ServerAuthManager
enum  Result {
  RequestedInfo , RequestedCredentials , Challenged , Skipped ,
  Rejected
}
 
- Public Types inherited from resip::DumFeature
enum  ProcessingResultMask { EventDoneBit = 1 << 0 , EventTakenBit = 1 << 1 , FeatureDoneBit = 1 << 2 , ChainDoneBit = 1 << 3 }
 
enum  ProcessingResult {
  EventTaken = EventTakenBit , FeatureDone = FeatureDoneBit , FeatureDoneAndEventDone = FeatureDoneBit | EventDoneBit , FeatureDoneAndEventTaken = FeatureDoneBit | EventTakenBit ,
  ChainDoneAndEventDone = ChainDoneBit | EventDoneBit , ChainDoneAndEventTaken = ChainDoneBit | EventTakenBit
}
 
- Protected Types inherited from resip::ServerAuthManager
enum  AuthFailureReason { InvalidRequest , BadCredentials , Error }
 
typedef std::map< Data, SipMessage * > MessageMap
 
- Protected Attributes inherited from resip::ServerAuthManager
MessageMap mMessages
 
bool mChallengeThirdParties
 
resip::Data mStaticRealm
 
std::vector< DigestType > mChallengeDigestTypes
 
- Protected Attributes inherited from resip::DumFeature
DialogUsageManager & mDum
 
TargetCommand::Target & mTarget
 

Detailed Description

This class is used to provide server digest authentication capabilities.

It uses the profile settings in order to determine if a SIP request should be challenged or not, and challenges appropriately.

It is used to challenge auto-answer requests and OOD refer requests.

Author: Scott Godin (sgodin AT SipSpectrum DOT com)

Definition at line 28 of file UserAgentServerAuthManager.hxx.

Constructor & Destructor Documentation

◆ UserAgentServerAuthManager()

UserAgentServerAuthManager::UserAgentServerAuthManager ( UserAgent &  userAgent)

Definition at line 18 of file UserAgentServerAuthManager.cxx.

◆ ~UserAgentServerAuthManager()

UserAgentServerAuthManager::~UserAgentServerAuthManager ( )

Definition at line 24 of file UserAgentServerAuthManager.cxx.

Member Function Documentation

◆ authorizedForThisIdentity()

bool UserAgentServerAuthManager::authorizedForThisIdentity ( const resip::Data &  user,
const resip::Data &  realm,
resip::Uri &  fromUri 
)
protectedvirtual

should return true if the passed in user is authorized for the provided uri

Reimplemented from resip::ServerAuthManager.

Definition at line 54 of file UserAgentServerAuthManager.cxx.

◆ getChallengeRealm()

const Data & UserAgentServerAuthManager::getChallengeRealm ( const resip::SipMessage &  msg)
protectedvirtual

returns the realm to be used for the challenge

Reimplemented from resip::ServerAuthManager.

Definition at line 41 of file UserAgentServerAuthManager.cxx.

◆ isMyRealm()

bool UserAgentServerAuthManager::isMyRealm ( const resip::Data &  realm)
protectedvirtual

should return true if realm passed in is ours and we can challenge

Reimplemented from resip::ServerAuthManager.

Definition at line 47 of file UserAgentServerAuthManager.cxx.

◆ proxyAuthenticationMode()

bool UserAgentServerAuthManager::proxyAuthenticationMode ( ) const
protectedvirtual

Reimplemented from resip::ServerAuthManager.

Definition at line 35 of file UserAgentServerAuthManager.cxx.

◆ requestCredential()

void UserAgentServerAuthManager::requestCredential ( const resip::Data &  user,
const resip::Data &  realm,
const resip::SipMessage &  msg,
const resip::Auth &  auth,
const resip::Data &  transactionId 
)
protectedvirtual

Implements resip::ServerAuthManager.

Definition at line 96 of file UserAgentServerAuthManager.cxx.

◆ requiresChallenge()

AsyncBool UserAgentServerAuthManager::requiresChallenge ( const resip::SipMessage &  msg)
protectedvirtual

should return true if the request must be challenged The default is to challenge all requests - override this class to change this beviour

Reimplemented from resip::ServerAuthManager.

Definition at line 62 of file UserAgentServerAuthManager.cxx.

◆ useAuthInt()

bool UserAgentServerAuthManager::useAuthInt ( ) const
protectedvirtual

Reimplemented from resip::ServerAuthManager.

Definition at line 29 of file UserAgentServerAuthManager.cxx.


The documentation for this class was generated from the following files: