Home > sip.js > UserAgentClient > authenticationGuard
If a 401 (Unauthorized) or 407 (Proxy Authentication Required) response is received, the UAC SHOULD follow the authorization procedures of Section 22.2 and Section 22.3 to retry the request with credentials. https://tools.ietf.org/html/rfc3261\#section-8.1.3.5 22 Usage of HTTP Authentication https://tools.ietf.org/html/rfc3261\#section-22 22.1 Framework https://tools.ietf.org/html/rfc3261\#section-22.1 22.2 User-to-User Authentication https://tools.ietf.org/html/rfc3261\#section-22.2 22.3 Proxy-to-User Authentication https://tools.ietf.org/html/rfc3261\#section-22.3
FIXME: This "guard for and retry the request with credentials" implementation is not complete and at best minimally passable.
Signature:
protected authenticationGuard(message: IncomingResponseMessage, dialog?: Dialog): boolean;
Parameter | Type | Description |
---|---|---|
message | IncomingResponseMessage | |
dialog | Dialog | If defined, the dialog within which the response was received. |
Returns:
boolean
True if the program execution is to continue in the branch in question. Otherwise the request is retried with credentials and current request processing must stop.