/ fm / liveswitch / Token
Class: Token
fm.liveswitch.Token
A token.
Table of contents
Constructors
Methods
- getAlgorithm
- getApiServiceId
- getApplicationId
- getChannelClaim
- getChannelClaims
- getClientId
- getClientRoles
- getConnectorId
- getDeviceId
- getExpirationTime
- getIssuedAt
- getMediaServerId
- getRecordingMonitorId
- getRecordingMoverId
- getRecordingMuxerId
- getRegion
- getType
- getTypeString
- getUserId
- getWebSocketMediaServerId
- verify
- generateClientJoinToken
- generateClientRegisterToken
- generateClientWebSocketAccessToken
- generateEventToken
- getDefaultExpiry
- getHmacSha256Algorithm
- getRsaSha256Algorithm
- parse
- verify
Constructors
constructor
+ new Token(): Token
Returns: Token
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:55
Methods
getAlgorithm
▸ getAlgorithm(): string
Gets the algorithm.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1244
getApiServiceId
▸ getApiServiceId(): string
Gets the API Service identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1256
getApplicationId
▸ getApplicationId(): string
Gets the application identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1268
getChannelClaim
▸ getChannelClaim(): ChannelClaim
Gets the first channel claim.
Returns: ChannelClaim
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1280
getChannelClaims
▸ getChannelClaims(): ChannelClaim[]
Gets an array of channel claims.
Returns: ChannelClaim[]
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1296
getClientId
▸ getClientId(): string
Gets the client identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1308
getClientRoles
▸ getClientRoles(): string[]
Gets the client roles.
Returns: string[]
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1320
getConnectorId
▸ getConnectorId(): string
Gets the Connector identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1332
getDeviceId
▸ getDeviceId(): string
Gets the device identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1344
getExpirationTime
▸ getExpirationTime(): DateTime
Gets the "expires at" date/time.
Returns: DateTime
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1356
getIssuedAt
▸ getIssuedAt(): DateTime
Gets the "issued at" date/time.
Returns: DateTime
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1368
getMediaServerId
▸ getMediaServerId(): string
Gets the Media Server identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1380
getRecordingMonitorId
▸ getRecordingMonitorId(): string
Gets the Recording Monitor identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1392
getRecordingMoverId
▸ getRecordingMoverId(): string
Gets the Recording Mover identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1404
getRecordingMuxerId
▸ getRecordingMuxerId(): string
Gets the Recording Muxer identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1416
getRegion
▸ getRegion(): string
Gets the region.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1428
getType
▸ getType(): string
Gets the type.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1440
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:9
getUserId
▸ getUserId(): string
Gets the user identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1452
getWebSocketMediaServerId
▸ getWebSocketMediaServerId(): string
Gets the Web Socket Media Server identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1464
verify
▸ verify(sharedSecret: string): boolean
Verifies the token signature.
Parameters:
| Name | Type | Description |
|---|---|---|
sharedSecret |
string | The shared secret. |
Returns: boolean
true if the signature is valid; otherwise, false.
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1675
generateClientJoinToken
▸ StaticgenerateClientJoinToken(applicationId: string, userId: string, deviceId: string, clientId: string, channelClaim: ChannelClaim, sharedSecret: string): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
channelClaim |
ChannelClaim | The channel claim. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:82
▸ StaticgenerateClientJoinToken(applicationId: string, userId: string, deviceId: string, clientId: string, channelClaim: ChannelClaim, sharedSecret: string, expirationTime: DateTime): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
channelClaim |
ChannelClaim | The channel claim. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:95
▸ StaticgenerateClientJoinToken(applicationId: string, userId: string, deviceId: string, clientId: string, channelId: string, sharedSecret: string): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:107
▸ StaticgenerateClientJoinToken(applicationId: string, userId: string, deviceId: string, clientId: string, channelId: string, sharedSecret: string, expirationTime: DateTime): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:120
▸ StaticgenerateClientJoinToken(client: Client, channelClaim: ChannelClaim, sharedSecret: string): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelClaim |
ChannelClaim | The channel claim. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:129
▸ StaticgenerateClientJoinToken(client: Client, channelClaim: ChannelClaim, sharedSecret: string, expirationTime: DateTime): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelClaim |
ChannelClaim | The channel claim. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:139
▸ StaticgenerateClientJoinToken(client: Client, channelId: string, sharedSecret: string): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:148
▸ StaticgenerateClientJoinToken(client: Client, channelId: string, sharedSecret: string, expirationTime: DateTime): string
Generates a signed client join token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:158
generateClientRegisterToken
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, channelClaims: ChannelClaim[], sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:236
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelClaims: ChannelClaim[], sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:249
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelClaims: ChannelClaim[], sharedSecret: string, expirationTime: DateTime): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:263
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelClaims: ChannelClaim[], sharedSecret: string, expirationTime: DateTime, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:278
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelClaims: ChannelClaim[], sharedSecret: string, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:292
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelId: string, sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:305
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelId: string, sharedSecret: string, expirationTime: DateTime): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:319
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelId: string, sharedSecret: string, expirationTime: DateTime, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:334
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelId: string, sharedSecret: string, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:348
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelIds: string[], sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:361
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelIds: string[], sharedSecret: string, expirationTime: DateTime): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:375
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelIds: string[], sharedSecret: string, expirationTime: DateTime, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:390
▸ StaticgenerateClientRegisterToken(applicationId: string, userId: string, deviceId: string, clientId: string, clientRoles: string[], channelIds: string[], sharedSecret: string, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
userId |
string | The user identifier. |
deviceId |
string | The device identifier. |
clientId |
string | The client identifier. |
clientRoles |
string[] | The client roles. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:404
▸ StaticgenerateClientRegisterToken(client: Client, channelClaims: ChannelClaim[], sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:413
▸ StaticgenerateClientRegisterToken(client: Client, channelClaims: ChannelClaim[], sharedSecret: string, expirationTime: DateTime): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:423
▸ StaticgenerateClientRegisterToken(client: Client, channelClaims: ChannelClaim[], sharedSecret: string, expirationTime: DateTime, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:434
▸ StaticgenerateClientRegisterToken(client: Client, channelClaims: ChannelClaim[], sharedSecret: string, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelClaims |
ChannelClaim[] | The channel claims. |
sharedSecret |
string | The shared secret. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:444
▸ StaticgenerateClientRegisterToken(client: Client, channelId: string, sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:453
▸ StaticgenerateClientRegisterToken(client: Client, channelId: string, sharedSecret: string, expirationTime: DateTime): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:463
▸ StaticgenerateClientRegisterToken(client: Client, channelId: string, sharedSecret: string, expirationTime: DateTime, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:474
▸ StaticgenerateClientRegisterToken(client: Client, channelId: string, sharedSecret: string, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelId |
string | The channel identifier. |
sharedSecret |
string | The shared secret. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:484
▸ StaticgenerateClientRegisterToken(client: Client, channelIds: string[], sharedSecret: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:493
▸ StaticgenerateClientRegisterToken(client: Client, channelIds: string[], sharedSecret: string, expirationTime: DateTime): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:503
▸ StaticgenerateClientRegisterToken(client: Client, channelIds: string[], sharedSecret: string, expirationTime: DateTime, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The time the token will expire in UTC. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:514
▸ StaticgenerateClientRegisterToken(client: Client, channelIds: string[], sharedSecret: string, region: string): string
Generates a signed client register token.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The client. |
channelIds |
string[] | The channel identifiers. |
sharedSecret |
string | The shared secret. |
region |
string | The region of the client. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:524
generateClientWebSocketAccessToken
▸ StaticgenerateClientWebSocketAccessToken(applicationId: string, userId: string, deviceId: string, clientId: string, sharedSecret: string): string
Generates a signed client websocket access token.
Parameters:
| Name | Type |
|---|---|
applicationId |
string |
userId |
string |
deviceId |
string |
clientId |
string |
sharedSecret |
string |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:762
generateEventToken
▸ StaticgenerateEventToken(applicationId: string, sharedSecret: string): string
Generates a signed event token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
sharedSecret |
string | The shared secret. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:777
▸ StaticgenerateEventToken(applicationId: string, sharedSecret: string, expirationTime: DateTime): string
Generates a signed event token.
Parameters:
| Name | Type | Description |
|---|---|---|
applicationId |
string | The application identifier. |
sharedSecret |
string | The shared secret. |
expirationTime |
DateTime | The expiration time. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:786
getDefaultExpiry
▸ StaticgetDefaultExpiry(): number
Gets the default token expiry (120 seconds).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:923
getHmacSha256Algorithm
▸ StaticgetHmacSha256Algorithm(): string
Gets the HMAC SHA-256 algorithm string.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:948
getRsaSha256Algorithm
▸ StaticgetRsaSha256Algorithm(): string
Gets the RSA SHA-256 algorithm string.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:961
parse
▸ Staticparse(tokenString: string): Token
Parses a token string.
Parameters:
| Name | Type | Description |
|---|---|---|
tokenString |
string | The token string. |
Returns: Token
The token.
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1036
verify
▸ Staticverify(tokenString: string, sharedSecret: string): boolean
Parses a token and verifies its signature.
Parameters:
| Name | Type | Description |
|---|---|---|
tokenString |
string | The token string. |
sharedSecret |
string | The shared secret. |
Returns: boolean
true if the token string could be parsed and the signature is valid; otherwise, false
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1219