Hierarchy

  • BaseClient
    • ClientCredentialsClient

Constructors

  • Parameters

    • props: IClientCredentialsClientProps

    Returns ClientCredentialsClient

Properties

accessCodeResponse: IAccessCodeResponse
apiUrl: string
getAccessTokenPromise: Promise<IAccessToken>
props: IClientCredentialsClientProps
redirectUrl: string
settings: ClientSettings

Methods

  • Parameters

    • url: string

    Returns string

  • Parameters

    • config: IAjaxCallConfig

    Returns void

  • Type Parameters

    • T

    Parameters

    • options: CallOptions
    • resolve: ((result) => void)
        • (result): void
        • Parameters

          • result: T

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void

  • Parameters

    • async: boolean

      true if method is called asynchronously.

    • resolve: ((response) => void)
        • (response): void
        • Parameters

          • response: IAccessToken

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    • tokenFailures: number

      Bitwise flag that indicates which methods we have tried. 1: accessToken failed. 2: refreshToken failed

    Returns void

  • Invokes a asynchronous request but with a valid access token. If access token exists, it's used. If access token gives 401 error, then a new is requested and the call is tried again

    Type Parameters

    • T

    Parameters

    • options: CallOptions

      options to pass to the ajax call

    • resolve: ((result) => void)

      callback for resolving a successful call

        • (result): void
        • Parameters

          • result: T

          Returns void

    • reject: ((error) => void)

      callback for resolving an erroneous call

        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void

  • Invokes a synchronous request but with a valid access token. If access token exists, it's used. If access token gives 401 error, then a new is requested and the call is tried again

    Type Parameters

    • T

    Parameters

    • options: CallOptions

      options to pass to the ajax call

    • resolve: ((result) => void)

      callback for resolving a successful call

        • (result): void
        • Parameters

          • result: T

          Returns void

    • reject: ((error) => void)

      callback for resolving an erroneous call

        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void

  • Converts an object to a x-www-form-urlencoded string

    Parameters

    • data: any

      The data object to convert

    • key: string = null

      The key describing the data, should be left empty on first call

    • list: string[] = []

      The list of added key=value pairs

    Returns string

  • Type Parameters

    • T

    Parameters

    • path: string
    • resolve: ((result) => void)
        • (result): void
        • Parameters

          • result: T

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void | Promise<T>

  • Parameters

    • async: boolean
    • resolve: ((response) => void)
        • (response): void
        • Parameters

          • response: IGetAccessCodeResponse

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void

  • Parameters

    • async: boolean

    Returns Promise<IAccessToken>

  • Parameters

    • resolve: ((response) => void)
        • (response): void
        • Parameters

          • response: IAccessToken

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    • tokenFailures: number

    Returns void

  • Returns string

  • Returns string

  • Checks if the current client has any cached credentials (access or refresh).

    Returns boolean

  • Type Parameters

    • T

    Parameters

    • path: string
    • argument: any
    • resolve: ((result) => void)
        • (result): void
        • Parameters

          • result: T

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void | Promise<T>

  • Type Parameters

    • T

    Parameters

    • options: CallOptions

      call options for the post method

    • resolve: ((result) => void)

      callback for resolving a successful call

        • (result): void
        • Parameters

          • result: T

          Returns void

    • reject: ((error) => void)

      callback for resolving an erroneous call

        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void | Promise<T>

  • Performs a synchronous post operation. Will block processing until response is received

    Type Parameters

    • T

    Parameters

    • options: CallOptions

      call options for the post method

    Returns T

    the json content in object form

  • Removes any cached authentication credentials

    Returns void

  • Parameters

    • async: boolean
    • resolve: ((response) => void)
        • (response): void
        • Parameters

          • response: IAccessToken

          Returns void

    • reject: ((error) => void)
        • (error): void
        • Parameters

          • error: IClientError

          Returns void

    Returns void

Generated using TypeDoc