iya-sts
    Preparing search index...

    The user portal's runtime: sign-in, routing and forms.

    Hierarchy (View Summary)

    Index
    accessToken: string
    accountChannel: any
    accountKey: string
    accounts: any
    clientId: string
    elsewhere: any
    env: any
    expiresAt: number
    identity: number
    identityController: any
    key: any
    metadata: any
    nonce: string
    prefix: string
    publicJwk: any
    refreshToken: string
    scope: string
    subject: string
    CALLBACK_CHANNEL: "sts-spa-callback" = 'sts-spa-callback'
    CALLBACK_HANDOFF_MS: 1000
    SIGNIN_KEYS: string[] = ...
    • Announces that this tab changed the browser's account list.

      Parameters

      • change: string

        added, signed-out, forgotten or changed

      Returns void

      nothing

    • Draws what an act answered.

      Parameters

      • path: string

        the portal path the form was on

      • answer: any

        { status, json }

      Returns Promise<void>

      nothing

    • Calls the account API with the person's token and reads its JSON; a request that needs a sign-in sends the window to one, back to this page.

      Parameters

      • method: string

        GET or POST

      • path: string

        the path under the realm, /account-api/... with its query

      • Optionalbody: any

        for a POST, an object

      Returns Promise<any>

      { status, json, res }, or null when a sign-in began

    • Builds the translator from language data, and marks the document's language and direction.

      Parameters

      • locale: any

        { negotiated, catalogs }

      Returns void

      nothing

    • The authorization server's metadata for this realm (RFC 8414), once.

      Returns Promise<any>

      the metadata, or {} where it cannot be read

    • The authorization request's URL: pushed first where the realm requires it, the query otherwise.

      Parameters

      • params: any

        the request's parameters, client_id among them

      Returns Promise<string>

      the URL to send the browser to

    • The realm's authorization request for this client.

      Parameters

      • state: string

        the state

      • verifier: string

        the PKCE verifier

      • Optionalextra: any

        prompt and acr_values for a step-up, or nothing

      Returns Promise<string>

      the URL

    • Sends the browser to sign in, remembering where to come back to.

      Parameters

      • returnTo: string

        the path and query to land on after

      • Optionalextra: any

        prompt and acr_values for a step-up; for a switch (#561) login_hint ('' for none), expect (the subject the answer must be for) and another; or nothing

      Returns Promise<void>

      nothing

    • The parameters of the authorization response this page was loaded with, from the fragment or, for a realm that offers only the query, the query.

      Returns any

      the parameters

    • Discards what this client holds for the identity that just ended: the tokens, the subject, the DPoP key and its nonce, and the metadata. A key is made again for the next sign-in, as a page load makes one.

      Returns void

      nothing

    • Draws a page that says something went wrong, with no frame.

      Parameters

      • title: string

        what went wrong

      • detail: string

        the detail

      Returns void

      nothing

    • Ends the identity requests are sent for: every request in flight is aborted, and an answer to one sent before is not believed.

      Returns void

      nothing

    • The operation table, once: which operation each form goes to.

      Returns Promise<boolean>

      whether it is in hand

    • 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

    • Goes to a portal path, adding it to the history.

      Parameters

      • to: string

        the path and query under the realm, /portal/...

      Returns Promise<void>

      nothing

    • Offers this callback to the tab that started the sign-in.

      A same-device wallet opens the verifier's return in a new tab. The passkey, when one is asked for, finishes there, and the authorization server then sends that tab to this callback. The PKCE record was written in the tab that called beginSignIn and never left it, so this tab cannot redeem the code. It asks that tab to load this address. The code rides only on the answer to a tab that said it holds the record. No answer within a second, and this tab finishes the refusal itself.

      Parameters

      • query: any

        the opened authorization response

      Returns Promise<boolean>

      whether a tab accepted the callback

    • The login_hint a sign-in sends: what the caller names, else the tab's account, else none.

      Parameters

      • extra: any

        what the sign-in was started with: login_hint ('' for none at all, as Sign in with another account asks)

      Returns string

      the hint, or ''

    • RFC 9207's iss on the authorization response, where the server sends one (ASVS 5.0.0 10.2.2): it must name this server.

      Parameters

      • query: any

        the response's parameters

      Returns Promise<boolean>

      false when the response came from somebody else

    • Keeps the tab's account, or forgets it.

      Parameters

      • account: any

        { sub, username }, or null to forget it

      Returns void

      nothing

    • Listens for changes to the browser's account list, once: each change reads the list again and hands it to then, and changes nothing else.

      Parameters

      • then: (list: any) => void

        draws the menu again from the list

      Returns void

      nothing

    • The nonce of a sign-in whose PKCE verifier this is.

      Parameters

      • verifier: string

        the sign-in's PKCE verifier

      Returns Promise<string>

      the nonce, base64url

    • Whether an ID Token carries the nonce of the sign-in that verifier began.

      Parameters

      • idToken: any

        the compact JWT the token endpoint answered

      • verifier: string

        the sign-in's PKCE verifier

      Returns Promise<boolean>

      whether the nonce is there and is that sign-in's

    • Follows a link in place when it is a portal page of this origin.

      Parameters

      • event: any

        the click

      Returns void

      nothing

    • Records the navigation section opened, and closes the others.

      Parameters

      • target: any

        the element a toggle event was fired at

      Returns void

      nothing

    • Handles a submitted form: the sign-out, a GET form's navigation, or an act.

      Parameters

      • event: any

        the submit event

      Returns void

      nothing

    • The part of a page's query its operation takes (#1483): the operation refuses a name it does not declare, and an address holds others. With no table in hand, everything: the API says what it will not take.

      Parameters

      • operation: string

        the GET operation's path

      • query: any

        the page's query

      Returns Promise<any>

      the query to send

    • The owner token, refreshed when it is missing or running out.

      Returns Promise<any>

      { token, signIn }: the token ('' where none is to be had), and whether the grant itself is gone, so signing in again is the way

    • Calls the management API with the owner token (#607) and reads its JSON. A token the authorization server would not issue — the person owns nothing now — answers 403 with the reason, drawn on the page; a grant that is gone sends the window to sign in again.

      Parameters

      • method: string

        GET or POST

      • path: string

        /admin-api/... with its query

      • Optionalbody: any

        for a POST, an object

      Returns Promise<any>

      { status, json }, or null when a sign-in began

    • Tells whether the owner token carries a scope.

      Parameters

      • scope: string

        owner:read or owner:write

      Returns boolean

      whether it does

    • The management API, the second resource the portal's sign-in names (#607).

      Returns string

      the resource indicator

    • The portal path of a full path under this realm, or null.

      Parameters

      • pathname: string

        the path

      Returns string

      /portal... without the prefix, or null

    • Makes a DPoP proof for one request.

      Parameters

      • method: string

        the request's method

      • url: string

        the request's URL; its query and fragment are dropped

      • accessToken: string

        the access token it is sent with, or ''

      Returns Promise<string>

      the proof

    • 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

    • Puts a page in the document and wires what it carries.

      Parameters

      • title: string

        the document's title

      • html: string

        the page

      Returns void

      nothing

    • Reads the browser's account list, keeps it, and keeps the tab's account from it: the signed-in subject's username, or forgets the account where the list is off.

      Parameters

      • username: string

        the signed-in person's username as the application knows it, for a subject the list does not name

      Returns Promise<any>

      the list

    • Draws the account menu's items again from the list in hand, leaving the page as it is.

      Returns void

      nothing

    • Posts a form's finish and does not draw what it answered.

      Parameters

      • form: any

        the ceremony's form

      • body: any

        the fields that replace the form's, the credential

      Returns Promise<void>

      nothing

    • 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

    • Sends one request with the tokens in hand, refreshing them where they have run out.

      Parameters

      • method: string

        the method

      • target: string

        the absolute URL

      • Optionalbody: any

        an object, sent as JSON, or nothing

      Returns Promise<any>

      the response, or NEEDS_SIGN_IN

    • SHA-256 of a string, base64url.

      Parameters

      • text: string

        the string

      Returns Promise<string>

      the digest's encoding

    • Signs this tab in as another account: a fresh sign-in (prompt=login) with no hint, whose account the tab then is.

      Parameters

      • OptionalreturnTo: string

        where to land after; this page where left out

      Returns Promise<void>

      nothing

    • Sends a POST form to the operation that mirrors it, and draws what it answered.

      Parameters

      • form: any

        the form

      • submitter: any

        the button pressed, if any

      Returns Promise<void>

      nothing

    • Sends an owner's form to the management API (#607) and draws the page again, with the answer's message — and a secret it answered once, said once — or its errors.

      Parameters

      • path: string

        /admin-api/<kind>/<action>

      • fields: any

        the form's fields

      Returns Promise<void>

      nothing

    • Switches this tab to another signed-in account of the browser.

      Parameters

      • key: string

        the account's key, from the menu

      Returns Promise<void>

      nothing

    • Posts a form to the token endpoint with a DPoP proof.

      Parameters

      • form: any

        the form fields

      Returns Promise<any>

      the response's JSON and status

    • 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

    • Whether an answer is for the subject asked for: the one subject check the console's popup made first (#508) and every switch makes now (#561).

      Parameters

      • expected: string

        the subject asked for

      • idToken: any

        the ID Token the token endpoint answered

      Returns boolean

      whether its sub is that subject

    • 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

    • A string claim of an ID Token, read without verifying it.

      Parameters

      • idToken: any

        the compact JWT, or nothing

      • name: string

        the claim

      Returns string

      its value, or ''

    • Form-encodes parameters, a value that is an array as the parameter repeated — RFC 8707's resource, which a client asking for two resources sends twice (#607). URLSearchParams(object) would join the array with commas into one value naming no resource.

      Parameters

      • params: any

        the parameters

      Returns string

      the encoded form

    • 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

    • Splits a path at the portal: the realm prefix before /portal.

      Parameters

      • pathname: string

        a path

      Returns string

      the prefix, '' in the default realm

    • 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

    • The sub of an ID Token, read without verifying it.

      Parameters

      • idToken: any

        the compact JWT, or nothing

      Returns string

      the subject, or ''

    • WebCrypto's names for a JWS algorithm: how its key is imported and how a signature is verified, or null for one WebCrypto does not do.

      Parameters

      • alg: string

        the JWS alg

      Returns any

      { importAs, verifyAs }, or null

    • Wires every select[data-depends-on] in the document to its radios.

      Parameters

      • doc: any

        the document

      Returns void

      nothing