import { JwkStore } from '../jwt/jwk-store'; import { JwtHandler } from '../jwt/jwt-handler'; import { JsonObject } from '../utils/json'; /** * Service class to react to changes in the config form on COYO side. */ export declare class ConfigAdapter { private readonly srcId; private static readonly REQ_SUBJECT; private static readonly RES_SUBJECT; protected listener: ((event: MessageEvent) => Promise) | null; protected jwkStore: JwkStore; protected jwtHandler: JwtHandler; protected userId: string | null; /** * Creates a new instance of this class. * * @param srcId the plug-in source ID to use for requests * @returns the new instance */ constructor(srcId: string); /** * Bind this instance to a specific user ID to only accept tokens that define * the same user ID via "ctx.userId". * * @param userId the user ID */ bind(userId: string): void; /** * Connects the given callback listeners to config form events coming from COYO. * * @param cb a callback to be executed when the form should be saved * @param validate a flag indicating if the JWT response should be validated */ connect(cb: (respond: (data: boolean | JsonObject) => void, token: string) => void, validate: boolean): void; /** * Disconnects all registered listeners. */ disconnect(): void; }