Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Token

Hierarchy

  • Token

Index

Properties

accessToken

accessToken: string

appKey

appKey: string

endpointId

endpointId: string

expiresIn

expiresIn: number

owner

owner: string

format: {phone-number}*{extension-number}

ownerId

ownerId: string

refreshToken

refreshToken: string

refreshTokenExpiresIn

refreshTokenExpiresIn: number

scope

scope: string[]

type

type: string

Methods

expired

  • expired(): boolean

fromCache

  • fromCache(cached: any): this
  • Restore from cached data. After restored from cache, you should validate the owner info.

    Parameters

    • cached: any

    Returns this

fromServer

  • fromServer(newToken: any, timeSpent: number): this
  • Populate token from server response. You should set owner after calling this method. timeSpent: Time in ms spent fetching token.

    Parameters

    • newToken: any
    • timeSpent: number

    Returns this

refreshTokenExpired

  • refreshTokenExpired(): boolean

setOwner

  • setOwner(appKey: string, ownerInfo?: RCAccount): void
  • Parameters

    • appKey: string
    • Optional ownerInfo: RCAccount

    Returns void

validateOwner

  • validateOwner(appKey: string, ownerInfo?: RCAccount): void
  • Parameters

    • appKey: string
    • Optional ownerInfo: RCAccount

    Returns void

Generated using TypeDoc