Search Results for

    / fm / liveswitch / Token

    Class: Token

    fm.liveswitch.Token

    A token.

    Table of contents

    Constructors

    • constructor

    Methods

    • getAlgorithm
    • getApiServiceId
    • getApplicationId
    • getChannelClaim
    • getChannelClaims
    • getClientId
    • getClientRoles
    • getConnectorId
    • getDeviceId
    • getExpirationTime
    • getIssuedAt
    • getMediaServerId
    • getRecordingMonitorId
    • getRecordingMoverId
    • getRecordingMuxerId
    • getRegion
    • getType
    • getTypeString
    • getUserId
    • verify
    • generateClientJoinToken
    • generateClientRegisterToken
    • generateEventToken
    • getDefaultExpiry
    • getHmacSha256Algorithm
    • getRsaSha256Algorithm
    • parse
    • verify

    Constructors

    constructor

    + new Token(): Token

    Returns: Token

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:53

    Methods

    getAlgorithm

    ▸ getAlgorithm(): string

    Gets the algorithm.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1203


    getApiServiceId

    ▸ getApiServiceId(): string

    Gets the API Service identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1215


    getApplicationId

    ▸ getApplicationId(): string

    Gets the application identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1227


    getChannelClaim

    ▸ getChannelClaim(): ChannelClaim

    Gets the first channel claim.

    Returns: ChannelClaim

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1239


    getChannelClaims

    ▸ getChannelClaims(): ChannelClaim[]

    Gets an array of channel claims.

    Returns: ChannelClaim[]

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1255


    getClientId

    ▸ getClientId(): string

    Gets the client identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1267


    getClientRoles

    ▸ getClientRoles(): string[]

    Gets the client roles.

    Returns: string[]

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1279


    getConnectorId

    ▸ getConnectorId(): string

    Gets the Connector identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1291


    getDeviceId

    ▸ getDeviceId(): string

    Gets the device identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1303


    getExpirationTime

    ▸ getExpirationTime(): DateTime

    Gets the "expires at" date/time.

    Returns: DateTime

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1315


    getIssuedAt

    ▸ getIssuedAt(): DateTime

    Gets the "issued at" date/time.

    Returns: DateTime

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1327


    getMediaServerId

    ▸ getMediaServerId(): string

    Gets the Media Server identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1339


    getRecordingMonitorId

    ▸ getRecordingMonitorId(): string

    Gets the Recording Monitor identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1351


    getRecordingMoverId

    ▸ getRecordingMoverId(): string

    Gets the Recording Mover identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1363


    getRecordingMuxerId

    ▸ getRecordingMuxerId(): string

    Gets the Recording Muxer identifier.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1375


    getRegion

    ▸ getRegion(): string

    Gets the region.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1387


    getType

    ▸ getType(): string

    Gets the type.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:1399


    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:1411


    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:1614


    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:80

    ▸ 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:93

    ▸ 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:105

    ▸ 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:118

    ▸ 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:127

    ▸ 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:137

    ▸ 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:146

    ▸ 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:156


    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:234

    ▸ 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:247

    ▸ 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:261

    ▸ 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:276

    ▸ 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:290

    ▸ 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:303

    ▸ 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:317

    ▸ 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:332

    ▸ 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:346

    ▸ 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:359

    ▸ 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:373

    ▸ 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:388

    ▸ 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:402

    ▸ 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:411

    ▸ 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:421

    ▸ 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:432

    ▸ 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:442

    ▸ 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:451

    ▸ 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:461

    ▸ 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:472

    ▸ 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:482

    ▸ 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:491

    ▸ 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:501

    ▸ 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:512

    ▸ 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:522


    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:757

    ▸ 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:766


    getDefaultExpiry

    ▸ StaticgetDefaultExpiry(): number

    Gets the default token expiry (120 seconds).

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:888


    getHmacSha256Algorithm

    ▸ StaticgetHmacSha256Algorithm(): string

    Gets the HMAC SHA-256 algorithm string.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:913


    getRsaSha256Algorithm

    ▸ StaticgetRsaSha256Algorithm(): string

    Gets the RSA SHA-256 algorithm string.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/Token.ts:926


    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:1001


    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:1178

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0