Package com.opentok
Class TokenOptions
java.lang.Object
com.opentok.TokenOptions
Defines values for the
tokenOptions
parameter of the
OpenTok.generateToken(String sessionId, TokenOptions tokenOptions)
method
and the Session.generateToken(TokenOptions tokenOptions)
method.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Use this class to create a TokenOptions object. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Returns the connection metadata assigned to the token.long
Returns the expiration time the token, as the number of seconds since the UNIX epoch.Returns the initial layout class list for streams published by the client using this token.getRole()
Returns the role assigned to the token.boolean
Returns whether the generated token will be in the old T1 format instead of JWT.
-
Method Details
-
getRole
Returns the role assigned to the token. SeeTokenOptions.Builder.role(Role role)
. -
getExpireTime
public long getExpireTime()Returns the expiration time the token, as the number of seconds since the UNIX epoch. SeeTokenOptions.Builder.expireTime(long expireTime)
. -
getData
Returns the connection metadata assigned to the token. SeeTokenOptions.Builder.data(String data)
. -
getInitialLayoutClassList
Returns the initial layout class list for streams published by the client using this token. SeeTokenOptions.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
-