iya-sts
    Preparing search index...

    Class export=

    The base of every static surface's runtime: where things are, fetch, forms and links.

    Hierarchy (View Summary)

    Index
    • Makes the page's runtime base.

      Parameters

      • env: any

        the browser's objects: fetch, location, history, document, and whatever the subclass reads; for a test, formDataOf

      • prefix: string

        the realm's path prefix, '' in the default realm

      • Optionalelsewhere: Record<string, string>

        the shell's attributes by the first path segment each stands for: { '/oauth2': 'data-sts-oauth', ... }

      Returns export=

    elsewhere: any
    env: any
    prefix: string
    • A form's fields as an object: a repeated name is an array, the pressed button's name and value are included, and the CSRF field a form drawn by the server carried is left out (an API call is not a form post).

      Parameters

      • form: any

        the form element

      • submitter: any

        the button pressed, if any

      Returns any

      the fields

    • Calls an operation that takes no token, sending an object as JSON, and reads its JSON.

      Parameters

      • method: string

        GET or POST

      • path: string

        the path under the realm

      • Optionalbody: any

        for a POST, an object

      • Optionalheaders: any

      Returns Promise<any>

      { status, json, res }, json null where the body was not JSON

    • Saves a file an answer carried as base64.

      Parameters

      • name: string

        its file name

      • mime: string

        its media type

      • base64: string

        its bytes

      Returns void

      nothing

    • Hands a blob to the browser as a download.

      Parameters

      • name: string

        the file's name

      • blob: Blob

        its contents

      Returns void

      nothing

    • Saves text as a file.

      Parameters

      • name: string

        the file's name

      • mime: string

        its media type

      • text: string

        its contents

      Returns void

      nothing

    • Makes the address's fragment the :target of the page just drawn.

      Returns void

      nothing

    • This realm's address for one of its paths: on this origin, or on the listener that answers the path where the shell named one.

      Parameters

      • path: string

        /oauth2/token, /web/locales/catalogs.json

      Returns string

      the absolute URL

    • One attribute of the shell's <html> element.

      Parameters

      • env: any

        the browser's objects

      • name: string

        the attribute, data-sts-build

      Returns string

      its value, or '' where it is absent

    • Reads the shell's data-sts-* attributes into bases by path segment.

      Parameters

      • env: any

        the browser's objects; its document is read

      • attributes: Record<string, string>

        the attribute for each first path segment

      Returns any

      the bases, without a trailing slash, '' where absent

    • Splits a path at a surface's base: the realm prefix before it.

      Parameters

      • pathname: string

        a path, /realm/acme/portal/keys or /portal

      • base: string

        the surface's first path, /portal

      Returns string

      the prefix, '' in the default realm and where the path is not under the base

    • Parses a query string into an object, the last value of a repeated name winning as express's own parser does for a single value.

      Parameters

      • search: string

        ?a=1&b=2 or ''

      Returns any

      the query

    • Prefixes every root-relative href, action, formaction and src.

      Parameters

      • html: string

        the page

      • prefix: string

        the realm's path prefix, or '' for the default realm

      Returns string

      the page with its links in the realm

    • Moves a sign-in step's id from a link's query to its fragment (#1454). /authn/spnego stays: RFC 4559's exchange has no script to read one.

      Parameters

      • href: string

        the link

      Returns string

      the link to use

    • Takes a step's id off an API address, for a header (#1454).

      Parameters

      • path: string

        the operation's address

      Returns any

      the address, and the headers that carry what left it