Interface EventSubscriber

Example of usage

   const eventSubscriber: EventSubscriber = {

async onConnecting() {
// put here your logic during connection
console.log('Connecting');
},
async onAuthChallengeSigning() {
// put here your logic during signing challenge
console.log('Signing Challenge');
},
async onConnected(userInfo: any, pepperAccessToken: string) {
// put here your logic for post connection
console.log('Connected');
},
async onDisconnected() {
// put here your logic for post disconnection
console.log('Disconnected');
},
async onErrored(error: any) {
// put here your logic for handling errors
console.log('Connection error');
},
};

Hierarchy

  • EventSubscriber

Properties

onAuthChallengeSigning?: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • A function that is called when the sdk is performing the signing challenge.

      Returns Promise<void>

onConnected?: ((userInfo: UserInfo, pepperAccessToken?: string) => Promise<void>)

Type declaration

    • (userInfo: UserInfo, pepperAccessToken?: string): Promise<void>
    • A function that is called when the sdk is connected.

      Parameters

      • userInfo: UserInfo
      • Optional pepperAccessToken: string

      Returns Promise<void>

onConnecting?: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • A function that is called when the sdk is connecting.

      Returns Promise<void>

onDisconnected?: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • A function that is called when the sdk is disconnected.

      Returns Promise<void>

onErrored?: ((error: any) => Promise<void>)

Type declaration

    • (error: any): Promise<void>
    • A function that is called when the sdk has connection issues.

      Parameters

      • error: any

      Returns Promise<void>

Generated using TypeDoc