Options
All
  • Public
  • Public/Protected
  • All
Menu

Default implementation of the InteractionRoute. See function comments for specifics.

Hierarchy

  • BasicInteractionRoute

Implements

Index

Constructors

constructor

  • new BasicInteractionRoute(route: string, viewTemplates: Record<string, string>, handler: InteractionHandler, prompt?: string, responseTemplates?: Record<string, string>, controls?: Record<string, string>): BasicInteractionRoute
  • Parameters

    • route: string

      Regex to match this route.

    • viewTemplates: Record<string, string>

      Templates to render on GET requests. Keys are content-types, values paths to a template.

    • handler: InteractionHandler

      Handler to call on POST requests.

    • Optional prompt: string

      In case of requests to the IDP entry point, the session prompt will be compared to this.

    • responseTemplates: Record<string, string> = {}

      Templates to render as a response to POST requests when required. Keys are content-types, values paths to a template.

    • controls: Record<string, string> = {}

      Controls to add to the response JSON. The keys will be copied and the values will be converted to full URLs.

    Returns BasicInteractionRoute

Properties

Readonly controls

controls: Record<string, string>

Readonly handler

Optional Readonly prompt

prompt?: string

Readonly responseTemplates

responseTemplates: Record<string, string>

Readonly route

route: RegExp

Readonly viewTemplates

viewTemplates: Record<string, string>

Methods

getControls

  • getControls(): Record<string, string>

handleOperation

supportsPath

  • supportsPath(path: string, prompt?: string): boolean