Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EditAdapter

Service class to react to changes in the edit mode on COYO side.

Hierarchy

  • EditAdapter

Index

Constructors

constructor

  • Creates a new instance of this class.

    Returns EditAdapter

    the new instance

Properties

Protected jwkStore

jwkStore: JwkStore

Protected jwtHandler

jwtHandler: JwtHandler

Protected listener

listener: ((event: MessageEvent) => Promise<void>) | null = null

Protected userId

userId: string | null = null

Methods

bind

  • bind(userId: string): void
  • Bind this instance to a specific user ID to only accept tokens that define the same user ID via "ctx.userId".

    Parameters

    • userId: string

      the user ID

    Returns void

connect

  • connect(cb: (edit: true, action: "enter" | "save" | "cancel") => void): void
  • Connects the given callback listener to edit mode events coming from COYO.

    Parameters

    • cb: (edit: true, action: "enter" | "save" | "cancel") => void

      a callback to be executed when a new edit mode message comes in

        • (edit: true, action: "enter" | "save" | "cancel"): void
        • Parameters

          • edit: true
          • action: "enter" | "save" | "cancel"

          Returns void

    Returns void

disconnect

  • disconnect(): void
  • Disconnects all registered listeners.

    Returns void

Generated using TypeDoc