/ 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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientJoinToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientRegisterToken(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
▸ Static
generateClientWebSocketAccessToken(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
▸ Static
generateEventToken(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
▸ Static
generateEventToken(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
▸ Static
getDefaultExpiry(): number
Gets the default token expiry (120 seconds).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:923
getHmacSha256Algorithm
▸ Static
getHmacSha256Algorithm(): string
Gets the HMAC SHA-256 algorithm string.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:948
getRsaSha256Algorithm
▸ Static
getRsaSha256Algorithm(): string
Gets the RSA SHA-256 algorithm string.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:961
parse
▸ Static
parse(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
▸ Static
verify(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