Interface ProvisioningApiOpts

interface ProvisioningApiOpts {
    allowedIpRanges?: string[];
    apiPrefix?: string;
    disallowedIpRanges?: string[];
    expressApp?: Application;
    openIdOverride?: {
        [serverName: string]: URL;
    };
    provisioningToken?: string;
    ratelimit?: boolean | Partial<Options>;
    widgetFrontendLocation?: string;
    widgetTokenLifetimeMs?: number;
    widgetTokenPrefix?: string;
}

Properties

allowedIpRanges?: string[]

Allow these IP ranges to be hit when handling OpenID requests even if they are within disallowedIpRanges. This allows specific sub-ranges of disallowedIpRanges to be used without having to carefully construct the ranges that still should be disallowed.

If the IP the OpenID request would be made to isn't in either list it is implicitly allowed.

Defaults to the empty list.

apiPrefix?: string

Prefix to use for the API. E.g. /api in /api/v1/session

Default is /api.

disallowedIpRanges?: string[]

Disallow these IP ranges from being hit when handling OpenID requests. By default, a number of intenal ranges are blocked.

See

DefaultDisallowedIpRanges

expressApp?: Application

Provide an existing express app to bind to.

Note: start() and close() will no-op when this is used.

openIdOverride?: {
    [serverName: string]: URL;
}

A set of Matrix server names to override the well known response to. Should only be used for testing.

Type declaration

  • [serverName: string]: URL
provisioningToken?: string

Secret token for provisioning requests

ratelimit?: boolean | Partial<Options>

Options for ratelimiting requests to the api server. Does not affect static content loading.

widgetFrontendLocation?: string

Where are the files stored for the widget frontend. If undefined, do not host a frontend.

widgetTokenLifetimeMs?: number

How long should a widget token last for?

widgetTokenPrefix?: string

For widget tokens, use this prefix.

Generated using TypeDoc