#include <SubscriptionAuth.h>

Note that this plug-in will return CONTINUE for all SUBSCRIBE requests that do not need to be challenged by this plug-in. Such a behavior enables other Auth plug-ins in the chain to impose the challenge of such SUBSCRIBE requests if they wish to do so based on their authentication policies by returning DENY. This is an AuthRules plugin called by SipRouter.
Public Member Functions | |
| virtual | ~SubscriptionAuth () |
| destructor | |
| virtual AuthResult | authorizeAndModify (const UtlString &id, const Url &requestUri, RouteState &routeState, const UtlString &method, AuthResult priorResult, SipMessage &request, bool bSpiralingRequest, UtlString &reason) |
| Enforces authentication of SUBSCRIBE requests. | |
| virtual void | readConfig (OsConfigDb &configDb) |
| Read (or re-read) the authorization rules. | |
| virtual void | announceAssociatedSipRouter (SipRouter *sipRouter) |
| Used to announce the SIP Router instance that is logically associated with this Auth Plugin. Plugins that need to interact with their associated SIP Router can override this method and save the passed pointer for later use. | |
Private Member Functions | |
| UtlBoolean | isTargetExemptedFromAuthentication (const UtlString &targetUser) const |
| determines whether or not the target of the request is exempted from authentication based on the user part of the R-URI and the configured list of exempted users. | |
| SubscriptionAuth (const UtlString &instanceName) | |
| Constructor - private so that only the factory can call it. | |
Private Attributes | |
| SipRouter * | mpSipRouter |
| UtlSList | mEventPackagesRequiringAuthentication |
| UtlSList | mTargetsExemptedFromAuthentication |
Static Private Attributes | |
| static const char * | EventsRequiringAuthenticationKey = "PACKAGES_REQUIRING_AUTHENTICATION" |
| static const char * | TargetsExemptedFromAuthenticationKey = "TARGETS_EXEMPTED_FROM_AUTHENTICATION" |
Friends | |
| class | SubscriptionAuthTest |
| AuthPlugin * | getAuthPlugin (const UtlString &name) |
| Factory used by PluginHooks to dynamically link the plugin instance. | |
| ~SubscriptionAuth | ( | ) | [virtual] |
destructor
| SubscriptionAuth | ( | const UtlString & | instanceName | ) | [private] |
Constructor - private so that only the factory can call it.
constructor
| instanceName | the configured name for this plugin instance |
| AuthPlugin::AuthResult authorizeAndModify | ( | const UtlString & | id, | |
| const Url & | requestUri, | |||
| RouteState & | routeState, | |||
| const UtlString & | method, | |||
| AuthResult | priorResult, | |||
| SipMessage & | request, | |||
| bool | bSpiralingRequest, | |||
| UtlString & | reason | |||
| ) | [virtual] |
Enforces authentication of SUBSCRIBE requests.
| id | The authenticated identity of the request originator, if any (the null string if not). This is in the form of a SIP uri identity value as used in the credentials database (user) without the scheme or any parameters. |
| requestUri | parsed target Uri |
| routeState | the state for this request. |
| method | the request method |
| priorResult | results from earlier plugins. |
| request | see AuthPlugin regarding modifying |
| bSpiralingRequest | request spiraling indication |
| reason | rejection reason |
Implements AuthPlugin.
| void readConfig | ( | OsConfigDb & | configDb | ) | [virtual] |
Read (or re-read) the authorization rules.
| configDb | a subhash of the individual configuration parameters for this instance of this plugin. |
Implements AuthPlugin.
| void announceAssociatedSipRouter | ( | SipRouter * | sipRouter | ) | [virtual] |
Used to announce the SIP Router instance that is logically associated with this Auth Plugin. Plugins that need to interact with their associated SIP Router can override this method and save the passed pointer for later use.
Reimplemented from AuthPlugin.
| UtlBoolean isTargetExemptedFromAuthentication | ( | const UtlString & | targetUser | ) | const [private] |
determines whether or not the target of the request is exempted from authentication based on the user part of the R-URI and the configured list of exempted users.
friend class SubscriptionAuthTest [friend] |
| AuthPlugin* getAuthPlugin | ( | const UtlString & | name | ) | [friend] |
Factory used by PluginHooks to dynamically link the plugin instance.
const char * EventsRequiringAuthenticationKey = "PACKAGES_REQUIRING_AUTHENTICATION" [static, private] |
const char * TargetsExemptedFromAuthenticationKey = "TARGETS_EXEMPTED_FROM_AUTHENTICATION" [static, private] |
SipRouter* mpSipRouter [private] |
UtlSList mTargetsExemptedFromAuthentication [private] |