Table of Contents

adv.getTokenVal()

wrtc.adv.getTokenVal() is used to extract values from the unencrypted part of a REST authentication token.

A REST authentication token always contains an encrypted payload that only IXNX server can decrypt, but it may also contain unencrypted data visible for everyone.

Arguments

wrtc.adv.getTokenVal(key, token)

There are many different token fields a REST authentication token may contain:

Other token fields may be added in the future. All fields except t= are optional.

You may add your own token fields. The client can read those fields using wrtc.adv.getTokenVal()

Returns

The requested token field's value.

Example

If REST authentication token contained:

e=1427887637\nu=martinga\nn=mgrest\npp=abc\nt=a3IveZSExvjXQUPkQuyaJg\ni=IvZM_WBUpDzDv6Ay\nc=Hm_39-g9

wrtc.adv.getTokenVal("u") will return "martinga"

See Also

wrtc.setRESTtoken()