Table of Contents

setRESTtoken()

wrtc.setRESTtoken() is used to set REST authentication token.

REST authentication is carried out by user being authenticated by third part that gives user a token. Wrtc_kit will then send this token to IXNX server to prove it has been authenticated.

There are different methods to obtain the REST authentication token. One using HTTP GET is provided for your convenience wrtc.fetchRESTtoken(). You are however free to use whatever method you prefer to obtain the REST authentication token.

Once you have a fresh REST authentication token you must call wrtc.setRESTtoken() to give the token to the wrtc object.

Apart from storing the received REST authentication token, wrtc.setRESTtoken() also examines the unencrypted parts of the token and:

After wrtc.setRESTtoken() you need to call wrtc.changeCredentials() to send the new token to IXNX server.

Arguments

wrtc.setRESTtoken(token)

Returns

REST token path (URL to fetch next REST token from) if token contains a p= field, or undefined.

Also See

wrtc.fetchRESTtoken()

line.authenticate()