fm.liveswitch.Token Class Reference

A token. More...

Public Member Functions

String getAlgorithm ()
 Gets the algorithm. More...
 
String getApiServiceId ()
 Gets the API Service identifier. More...
 
String getApplicationId ()
 Gets the application identifier. More...
 
fm.liveswitch.ChannelClaim getChannelClaim ()
 Gets the first channel claim. More...
 
fm.liveswitch.ChannelClaim[] getChannelClaims ()
 Gets an array of channel claims. More...
 
String getClientId ()
 Gets the client identifier. More...
 
String[] getClientRoles ()
 Gets the client roles. More...
 
String getConnectorId ()
 Gets the Connector identifier. More...
 
String getDeviceId ()
 Gets the device identifier. More...
 
fm.liveswitch.NullableDate getExpirationTime ()
 Gets the "expires at" date/time. More...
 
java.util.Date getIssuedAt ()
 Gets the "issued at" date/time. More...
 
String getMediaServerId ()
 Gets the Media Server identifier. More...
 
String getRecordingMonitorId ()
 Gets the Recording Monitor identifier. More...
 
String getRecordingMoverId ()
 Gets the Recording Mover identifier. More...
 
String getRecordingMuxerId ()
 Gets the Recording Muxer identifier. More...
 
String getRegion ()
 Gets the region. More...
 
String getType ()
 Gets the type. More...
 
String getUserId ()
 Gets the user identifier. More...
 
String getWebSocketMediaServerId ()
 Gets the Web Socket Media Server identifier. More...
 
boolean verify (String sharedSecret)
 Verifies the token signature. More...
 

Static Public Member Functions

static String generateClientJoinToken (String applicationId, String userId, String deviceId, String clientId, fm.liveswitch.ChannelClaim channelClaim, String sharedSecret)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (String applicationId, String userId, String deviceId, String clientId, fm.liveswitch.ChannelClaim channelClaim, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (String applicationId, String userId, String deviceId, String clientId, String channelId, String sharedSecret)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (String applicationId, String userId, String deviceId, String clientId, String channelId, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (fm.liveswitch.Client client, fm.liveswitch.ChannelClaim channelClaim, String sharedSecret)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (fm.liveswitch.Client client, fm.liveswitch.ChannelClaim channelClaim, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (fm.liveswitch.Client client, String channelId, String sharedSecret)
 Generates a signed client join token. More...
 
static String generateClientJoinToken (fm.liveswitch.Client client, String channelId, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client join token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret, java.util.Date expirationTime, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String channelId, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String channelId, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String channelId, String sharedSecret, java.util.Date expirationTime, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String channelId, String sharedSecret, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String[] channelIds, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String[] channelIds, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String[] channelIds, String sharedSecret, java.util.Date expirationTime, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (String applicationId, String userId, String deviceId, String clientId, String[] clientRoles, String[] channelIds, String sharedSecret, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret, java.util.Date expirationTime, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, fm.liveswitch.ChannelClaim[] channelClaims, String sharedSecret, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String channelId, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String channelId, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String channelId, String sharedSecret, java.util.Date expirationTime, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String channelId, String sharedSecret, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String[] channelIds, String sharedSecret)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String[] channelIds, String sharedSecret, java.util.Date expirationTime)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String[] channelIds, String sharedSecret, java.util.Date expirationTime, String region)
 Generates a signed client register token. More...
 
static String generateClientRegisterToken (fm.liveswitch.Client client, String[] channelIds, String sharedSecret, String region)
 Generates a signed client register token. More...
 
static String generateClientWebSocketAccessToken (String applicationId, String userId, String deviceId, String clientId, String sharedSecret)
 Generates a signed client WebSocket access token. More...
 
static String generateEventToken (String applicationId, String sharedSecret)
 Generates a signed event token. More...
 
static String generateEventToken (String applicationId, String sharedSecret, java.util.Date expirationTime)
 Generates a signed event token. More...
 
static int getDefaultExpiry ()
 Gets the default token expiry (120 seconds). More...
 
static String getHmacSha256Algorithm ()
 Gets the HMAC SHA-256 algorithm string. More...
 
static String getRsaSha256Algorithm ()
 Gets the RSA SHA-256 algorithm string. More...
 
static fm.liveswitch.Token parse (String tokenString)
 Parses a token string. More...
 
static boolean verify (String tokenString, String sharedSecret)
 Parses a token and verifies its signature. More...
 

Detailed Description

A token.

Member Function Documentation

◆ generateClientJoinToken() [1/8]

static String fm.liveswitch.Token.generateClientJoinToken ( fm.liveswitch.Client  client,
fm.liveswitch.ChannelClaim  channelClaim,
String  sharedSecret 
)
static

Generates a signed client join token.

Parameters
clientThe client.
channelClaimThe channel claim.
sharedSecretThe shared secret.

◆ generateClientJoinToken() [2/8]

static String fm.liveswitch.Token.generateClientJoinToken ( fm.liveswitch.Client  client,
fm.liveswitch.ChannelClaim  channelClaim,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client join token.

Parameters
clientThe client.
channelClaimThe channel claim.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientJoinToken() [3/8]

static String fm.liveswitch.Token.generateClientJoinToken ( fm.liveswitch.Client  client,
String  channelId,
String  sharedSecret 
)
static

Generates a signed client join token.

Parameters
clientThe client.
channelIdThe channel identifier.
sharedSecretThe shared secret.

◆ generateClientJoinToken() [4/8]

static String fm.liveswitch.Token.generateClientJoinToken ( fm.liveswitch.Client  client,
String  channelId,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client join token.

Parameters
clientThe client.
channelIdThe channel identifier.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientJoinToken() [5/8]

static String fm.liveswitch.Token.generateClientJoinToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
fm.liveswitch.ChannelClaim  channelClaim,
String  sharedSecret 
)
static

Generates a signed client join token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
channelClaimThe channel claim.
sharedSecretThe shared secret.

◆ generateClientJoinToken() [6/8]

static String fm.liveswitch.Token.generateClientJoinToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
fm.liveswitch.ChannelClaim  channelClaim,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client join token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
channelClaimThe channel claim.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientJoinToken() [7/8]

static String fm.liveswitch.Token.generateClientJoinToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String  channelId,
String  sharedSecret 
)
static

Generates a signed client join token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
channelIdThe channel identifier.
sharedSecretThe shared secret.

◆ generateClientJoinToken() [8/8]

static String fm.liveswitch.Token.generateClientJoinToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String  channelId,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client join token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
channelIdThe channel identifier.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [1/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelClaimsThe channel claims.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [2/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelClaimsThe channel claims.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [3/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret,
java.util.Date  expirationTime,
String  region 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelClaimsThe channel claims.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.
regionThe region of the client.

◆ generateClientRegisterToken() [4/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret,
String  region 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelClaimsThe channel claims.
sharedSecretThe shared secret.
regionThe region of the client.

◆ generateClientRegisterToken() [5/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String  channelId,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdThe channel identifier.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [6/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String  channelId,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdThe channel identifier.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [7/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String  channelId,
String  sharedSecret,
java.util.Date  expirationTime,
String  region 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdThe channel identifier.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.
regionThe region of the client.

◆ generateClientRegisterToken() [8/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String  channelId,
String  sharedSecret,
String  region 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdThe channel identifier.
sharedSecretThe shared secret.
regionThe region of the client.

◆ generateClientRegisterToken() [9/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String[]  channelIds,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [10/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String[]  channelIds,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [11/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String[]  channelIds,
String  sharedSecret,
java.util.Date  expirationTime,
String  region 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.
regionThe region of the client.

◆ generateClientRegisterToken() [12/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( fm.liveswitch.Client  client,
String[]  channelIds,
String  sharedSecret,
String  region 
)
static

Generates a signed client register token.

Parameters
clientThe client.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.
regionThe region of the client.

◆ generateClientRegisterToken() [13/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
channelClaimsThe channel claims.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [14/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelClaimsThe channel claims.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [15/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelClaimsThe channel claims.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [16/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret,
java.util.Date  expirationTime,
String  region 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelClaimsThe channel claims.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.
regionThe region of the client.

◆ generateClientRegisterToken() [17/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
fm.liveswitch.ChannelClaim[]  channelClaims,
String  sharedSecret,
String  region 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelClaimsThe channel claims.
sharedSecretThe shared secret.
regionThe region of the client.

◆ generateClientRegisterToken() [18/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String  channelId,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdThe channel identifier.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [19/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String  channelId,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdThe channel identifier.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [20/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String  channelId,
String  sharedSecret,
java.util.Date  expirationTime,
String  region 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdThe channel identifier.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.
regionThe region of the client.

◆ generateClientRegisterToken() [21/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String  channelId,
String  sharedSecret,
String  region 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdThe channel identifier.
sharedSecretThe shared secret.
regionThe region of the client.

◆ generateClientRegisterToken() [22/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String[]  channelIds,
String  sharedSecret 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.

◆ generateClientRegisterToken() [23/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String[]  channelIds,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.

◆ generateClientRegisterToken() [24/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String[]  channelIds,
String  sharedSecret,
java.util.Date  expirationTime,
String  region 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.
expirationTimeThe time the token will expire in UTC.
regionThe region of the client.

◆ generateClientRegisterToken() [25/25]

static String fm.liveswitch.Token.generateClientRegisterToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String[]  clientRoles,
String[]  channelIds,
String  sharedSecret,
String  region 
)
static

Generates a signed client register token.

Parameters
applicationIdThe application identifier.
userIdThe user identifier.
deviceIdThe device identifier.
clientIdThe client identifier.
clientRolesThe client roles.
channelIdsThe channel identifiers.
sharedSecretThe shared secret.
regionThe region of the client.

◆ generateClientWebSocketAccessToken()

static String fm.liveswitch.Token.generateClientWebSocketAccessToken ( String  applicationId,
String  userId,
String  deviceId,
String  clientId,
String  sharedSecret 
)
static

Generates a signed client WebSocket access token.

Parameters
applicationId
userId
deviceId
clientId
sharedSecret

◆ generateEventToken() [1/2]

static String fm.liveswitch.Token.generateEventToken ( String  applicationId,
String  sharedSecret 
)
static

Generates a signed event token.

Parameters
applicationIdThe application identifier.
sharedSecretThe shared secret.

◆ generateEventToken() [2/2]

static String fm.liveswitch.Token.generateEventToken ( String  applicationId,
String  sharedSecret,
java.util.Date  expirationTime 
)
static

Generates a signed event token.

Parameters
applicationIdThe application identifier.
sharedSecretThe shared secret.
expirationTimeThe expiration time.

◆ getAlgorithm()

String fm.liveswitch.Token.getAlgorithm ( )

Gets the algorithm.

◆ getApiServiceId()

String fm.liveswitch.Token.getApiServiceId ( )

Gets the API Service identifier.

◆ getApplicationId()

String fm.liveswitch.Token.getApplicationId ( )

Gets the application identifier.

◆ getChannelClaim()

fm.liveswitch.ChannelClaim fm.liveswitch.Token.getChannelClaim ( )

Gets the first channel claim.

◆ getChannelClaims()

fm.liveswitch.ChannelClaim [] fm.liveswitch.Token.getChannelClaims ( )

Gets an array of channel claims.

◆ getClientId()

String fm.liveswitch.Token.getClientId ( )

Gets the client identifier.

◆ getClientRoles()

String [] fm.liveswitch.Token.getClientRoles ( )

Gets the client roles.

◆ getConnectorId()

String fm.liveswitch.Token.getConnectorId ( )

Gets the Connector identifier.

◆ getDefaultExpiry()

static int fm.liveswitch.Token.getDefaultExpiry ( )
static

Gets the default token expiry (120 seconds).

◆ getDeviceId()

String fm.liveswitch.Token.getDeviceId ( )

Gets the device identifier.

◆ getExpirationTime()

fm.liveswitch.NullableDate fm.liveswitch.Token.getExpirationTime ( )

Gets the "expires at" date/time.

◆ getHmacSha256Algorithm()

static String fm.liveswitch.Token.getHmacSha256Algorithm ( )
static

Gets the HMAC SHA-256 algorithm string.

◆ getIssuedAt()

java.util.Date fm.liveswitch.Token.getIssuedAt ( )

Gets the "issued at" date/time.

◆ getMediaServerId()

String fm.liveswitch.Token.getMediaServerId ( )

Gets the Media Server identifier.

◆ getRecordingMonitorId()

String fm.liveswitch.Token.getRecordingMonitorId ( )

Gets the Recording Monitor identifier.

◆ getRecordingMoverId()

String fm.liveswitch.Token.getRecordingMoverId ( )

Gets the Recording Mover identifier.

◆ getRecordingMuxerId()

String fm.liveswitch.Token.getRecordingMuxerId ( )

Gets the Recording Muxer identifier.

◆ getRegion()

String fm.liveswitch.Token.getRegion ( )

Gets the region.

◆ getRsaSha256Algorithm()

static String fm.liveswitch.Token.getRsaSha256Algorithm ( )
static

Gets the RSA SHA-256 algorithm string.

◆ getType()

String fm.liveswitch.Token.getType ( )

Gets the type.

◆ getUserId()

String fm.liveswitch.Token.getUserId ( )

Gets the user identifier.

◆ getWebSocketMediaServerId()

String fm.liveswitch.Token.getWebSocketMediaServerId ( )

Gets the Web Socket Media Server identifier.

◆ parse()

static fm.liveswitch.Token fm.liveswitch.Token.parse ( String  tokenString)
static

Parses a token string.

Parameters
tokenStringThe token string.
Returns
The token.

◆ verify() [1/2]

boolean fm.liveswitch.Token.verify ( String  sharedSecret)

Verifies the token signature.

Parameters
sharedSecretThe shared secret.
Returns
true
if the signature is valid; otherwise,
false
.

◆ verify() [2/2]

static boolean fm.liveswitch.Token.verify ( String  tokenString,
String  sharedSecret 
)
static

Parses a token and verifies its signature.

Parameters
tokenStringThe token string.
sharedSecretThe shared secret.
Returns
true
if the token string could be parsed and the signature is valid; otherwise,
false