java.lang.Object

com.opentok.TokenOptions


public class TokenOptions extends Object

Defines values for the tokenOptions parameter of the OpenTok.generateToken(String sessionId, TokenOptions tokenOptions) method and the Session.generateToken(TokenOptions tokenOptions) method.

See Also: : - OpenTok.createSession(com.opentok.SessionProperties properties)

Nested Class Summary

Nested Classes

Modifier and Type

Class

Description

static class

TokenOptions.Builder

Use this class to create a TokenOptions object.

Method Summary

All MethodsInstance MethodsConcrete Methods

Modifier and Type

Method

Description

String

getData()

Returns the connection metadata assigned to the token.

long

getExpireTime()

Returns the expiration time the token, as the number of seconds since the UNIX epoch.

List<String>

getInitialLayoutClassList()

Returns the initial layout class list for streams published by the client using this token.

Role

getRole()

Returns the role assigned to the token.

boolean

isLegacyT1Token()

Returns whether the generated token will be in the old T1 format instead of JWT.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

getRole

public Role getRole()

Returns the role assigned to the token. See TokenOptions.Builder.role(Role role).

getExpireTime

public long getExpireTime()

Returns the expiration time the token, as the number of seconds since the UNIX epoch. See TokenOptions.Builder.expireTime(long expireTime).

getData

public String getData()

Returns the connection metadata assigned to the token. See TokenOptions.Builder.data(String data).

getInitialLayoutClassList

public List<String> getInitialLayoutClassList()

Returns the initial layout class list for streams published by the client using this token. See TokenOptions.Builder.initialLayoutClassList(List initialLayoutClassList).

isLegacyT1Token

public boolean isLegacyT1Token()

Returns whether the generated token will be in the old T1 format instead of JWT.

Returns: : true if the token will be in the old T1 format, false otherwise.

Since: : 4.15.0