reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::ServerAuthManager Class Referenceabstract

#include <ServerAuthManager.hxx>

Inheritance diagram for resip::ServerAuthManager:
[legend]

Public Types

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
}
 

Public Member Functions

 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 Types

enum  AuthFailureReason { InvalidRequest , BadCredentials , Error }
 
typedef std::map< Data, SipMessage * > MessageMap
 

Protected Member Functions

virtual void requestCredential (const Data &user, const Data &realm, const SipMessage &msg, const Auth &auth, const Data &transactionToken)=0
 
virtual bool useAuthInt () const
 
virtual bool proxyAuthenticationMode () const
 
virtual bool rejectBadNonces () const
 
virtual AsyncBool requiresChallenge (const 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
 
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 const Data & getChallengeRealm (const SipMessage &msg)
 returns the realm to be used for the challenge
 
virtual bool isMyRealm (const Data &realm)
 should return true if realm passed in is ours and we can challenge
 
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)
 

Protected Attributes

MessageMap mMessages
 
bool mChallengeThirdParties
 
resip::Data mStaticRealm
 
std::vector< DigestType > mChallengeDigestTypes
 
- Protected Attributes inherited from resip::DumFeature
DialogUsageManager & mDum
 
TargetCommand::Target & mTarget
 

Detailed Description

Definition at line 19 of file ServerAuthManager.hxx.

Member Typedef Documentation

◆ MessageMap

typedef std::map<Data, SipMessage*> resip::ServerAuthManager::MessageMap
protected

Definition at line 72 of file ServerAuthManager.hxx.

Member Enumeration Documentation

◆ AuthFailureReason

Enumerator
InvalidRequest 
BadCredentials 
Error 

Definition at line 53 of file ServerAuthManager.hxx.

◆ Result

Enumerator
RequestedInfo 
RequestedCredentials 
Challenged 
Skipped 
Rejected 

Definition at line 22 of file ServerAuthManager.hxx.

Constructor & Destructor Documentation

◆ ServerAuthManager()

ServerAuthManager::ServerAuthManager ( DialogUsageManager &  dum,
TargetCommand::Target &  target,
bool  challengeThirdParties = true,
const resip::Data &  staticRealm = "",
const std::vector< DigestType > &  challengeDigestTypes = std::vector<DigestType>() 
)

Definition at line 21 of file ServerAuthManager.cxx.

◆ ~ServerAuthManager()

ServerAuthManager::~ServerAuthManager ( )
virtual

Definition at line 34 of file ServerAuthManager.cxx.

Member Function Documentation

◆ authorizedForThisIdentity()

bool ServerAuthManager::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 in recon::UserAgentServerAuthManager.

Definition at line 299 of file ServerAuthManager.cxx.

◆ getChallengeRealm()

const Data & ServerAuthManager::getChallengeRealm ( const SipMessage &  msg)
protectedvirtual

returns the realm to be used for the challenge

Reimplemented in recon::UserAgentServerAuthManager.

Definition at line 325 of file ServerAuthManager.cxx.

◆ handle()

ServerAuthManager::Result ServerAuthManager::handle ( SipMessage *  sipMsg)
virtual

Definition at line 357 of file ServerAuthManager.cxx.

◆ handleUserAuthInfo()

SipMessage * ServerAuthManager::handleUserAuthInfo ( UserAuthInfo *  auth)
virtual

dcm! – need to handle stale/unit test advancedAuthenticateRequest dcm! – delta? deal with.

Definition at line 128 of file ServerAuthManager.cxx.

◆ isMyRealm()

bool ServerAuthManager::isMyRealm ( const Data &  realm)
protectedvirtual

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

Reimplemented in recon::UserAgentServerAuthManager.

Definition at line 345 of file ServerAuthManager.cxx.

◆ issueChallenge()

void ServerAuthManager::issueChallenge ( SipMessage *  sipMsg,
bool  stale = false 
)
protected

Definition at line 472 of file ServerAuthManager.cxx.

◆ issueChallengeIfRequired()

ServerAuthManager::Result ServerAuthManager::issueChallengeIfRequired ( SipMessage *  sipMsg)
protected

Definition at line 453 of file ServerAuthManager.cxx.

◆ onAuthFailure()

void ServerAuthManager::onAuthFailure ( AuthFailureReason  reason,
const SipMessage &  msg 
)
protectedvirtual

Definition at line 493 of file ServerAuthManager.cxx.

◆ onAuthSuccess()

void ServerAuthManager::onAuthSuccess ( const SipMessage &  msg)
protectedvirtual

Definition at line 487 of file ServerAuthManager.cxx.

◆ process()

DumFeature::ProcessingResult ServerAuthManager::process ( Message *  msg)
virtual

dcm! – unnecessary happens in handle

Implements resip::DumFeature.

Definition at line 44 of file ServerAuthManager.cxx.

◆ proxyAuthenticationMode()

bool ServerAuthManager::proxyAuthenticationMode ( ) const
protectedvirtual

Reimplemented in recon::UserAgentServerAuthManager.

Definition at line 272 of file ServerAuthManager.cxx.

◆ rejectBadNonces()

bool ServerAuthManager::rejectBadNonces ( ) const
protectedvirtual

Reimplemented in repro::ReproServerAuthManager.

Definition at line 279 of file ServerAuthManager.cxx.

◆ requestCredential()

virtual void resip::ServerAuthManager::requestCredential ( const Data &  user,
const Data &  realm,
const SipMessage &  msg,
const Auth &  auth,
const Data &  transactionToken 
)
protectedpure virtual

◆ requiresChallenge()

AsyncBool ServerAuthManager::requiresChallenge ( const 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 in repro::ReproServerAuthManager, and recon::UserAgentServerAuthManager.

Definition at line 286 of file ServerAuthManager.cxx.

◆ useAuthInt()

bool ServerAuthManager::useAuthInt ( ) const
protectedvirtual

Member Data Documentation

◆ mChallengeDigestTypes

std::vector<DigestType> resip::ServerAuthManager::mChallengeDigestTypes
protected

Definition at line 105 of file ServerAuthManager.hxx.

◆ mChallengeThirdParties

bool resip::ServerAuthManager::mChallengeThirdParties
protected

Definition at line 103 of file ServerAuthManager.hxx.

◆ mMessages

MessageMap resip::ServerAuthManager::mMessages
protected

Definition at line 73 of file ServerAuthManager.hxx.

◆ mStaticRealm

resip::Data resip::ServerAuthManager::mStaticRealm
protected

Definition at line 104 of file ServerAuthManager.hxx.


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