2018-04-23 11:06:16 +02:00
|
|
|
import { OpenViduRole } from './OpenViduRole';
|
|
|
|
export interface TokenOptions {
|
2018-04-24 15:42:23 +02:00
|
|
|
/**
|
|
|
|
* Secure (server-side) data associated to this token. Every client will receive this data in property `Connection.data`. Object `Connection` can be retrieved by subscribing to event `connectionCreated` of Session object.
|
|
|
|
* - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this [[TokenOptions.data]] property.
|
|
|
|
* - If you have provided some data when calling `Session.connect(TOKEN, DATA)` (`DATA` defined), then `Connection.data` will have the following structure: `"CLIENT_DATA%/%SERVER_DATA"`, being `CLIENT_DATA` the second
|
|
|
|
* parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this [[TokenOptions.data]] property.
|
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
data: string;
|
2018-04-25 17:50:55 +02:00
|
|
|
/**
|
|
|
|
* The role assigned to this token
|
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
role: OpenViduRole;
|
2017-06-10 01:44:31 +02:00
|
|
|
}
|