====== changeCredentials() ====== wrtc.changeCredentials() changes the user's adress, displayname, password and other credentials and reinitializes its connection to the IXNX server. You can either supply the new credentials in a JSON structure as argument to wrtc.changeCredentials(), or first set wrtc user credential properties manually, then call wrtc.changeCredentials() without arguments to reinitialize IXNX server connection. ===== Arguments ===== wrtc.changeCredentials(credentials) * credentials - (optional) JSON structure containing: * addressName - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:addressname|addressName]] to use. * displayName - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:displayname|displayName]] to use. * sipAlias - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:sipalias|sipAlias]] to use. * sipAuthName - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:sipauthname|sipAuthName]] to use. * sipPassword - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:sippassword|sipPassword]] to use. * sipHa1 - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:sipha1|sipHa1]] to use. * restToken - (optional) string containing new [[ixnx:wrtc:js:api:wrtc:resttoken|restToken]] to use. * workgroups - (optional) list of new [[ixnx:wrtc:js:api:wrtc:workgroups|workgroups]] to use. Missing entries will keep old value unchanged. ===== Returns ===== Nothing. ===== Events ===== wrtc.changeCredentials() itself does not create any events but the reinialization of the connection to the IXNX server will result in one or more of these events: * [[ixnx:wrtc:js:api:wrtc:onauthenticate|wrtc.onAuthenticate()]] * [[ixnx:wrtc:js:api:wrtc:onloggedin|wrtc.onLoggedIn()]] * [[ixnx:wrtc:js:api:wrtc:onauthenticatefailed|wrtc.onAuthenticateFailed()]] * [[ixnx:wrtc:js:api:wrtc:onrejected|wrtc.onRejected()]] ===== Example ===== wrtc.changeCredentials({addressName:"foo@bar.com", displayName:"John Doe"}); changes user's address to foo@bar.com and display name to John Doe. All other settings remain unchanged.