line.authenticate()

line.authenticate() performs your authentication towards a server requesting it.

Usually you do not need to call line.authenticate() manually - it is called by wrtc_kit automatically when needed. In some advanced scenarios with different logins to different realms you may need to write your own wrtc.onAuthenticate() that calls line.authenticate()

line.authenticate() can perform digest and REST token authentications. It is the server requesting the authentication that decides which authentication method to use.

Arguments

Basic implementations call line.authenticate() without any arguments but more advanced implementations may supply arguments.

When calling line.authenticate() without arguments it will use the object's wrtc.sipAuthName, wrtc.sipPassword and wrtc.sipHa1 properties to perform digest authentication with. REST token authentications will instead use the REST token supplied to latest wrtc.setRESTtoken() call.

Advanced implementations can also supply their own username and password that will override wrtc.sipAuthName and wrtc.sipPassword:
line.authenticate(arg)

  • arg - (optional) JSON structure: {sipAuthName:…, sipPassword:…, sipHa1:…, restToken:…}
    • sipAuthName - (optional) SIP authentication name to use instead of wrtc.sipAuthName
    • sipPassword - (optional) SIP password to use instead of wrtc.sipPassword
    • sipHa1 - (optional) SIP password hashsum to use instead of wrtc.sipHa1
    • restToken - (optional) REST token to use instead of the one supplied to latest wrtc.setRESTtoken()

Returns

True if authentication could be carried out (no indication of authentication success, only for attempt), or false if authentication could not be carried out (due to eg missing indata).

Also See

ixnx/wrtc/js/api/line/authenticate.txt · Last modified: by tibor
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0