SessionScopes | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Interface SessionScopes

    Extend this interface to define the format of your own sessions

    interface SessionScopes {
        "platform:incomplete-account": {
            badPasswordTime: Instant | null;
            failedchecks: PasswordCheck[];
            returnTo: string;
            user: number;
        };
        "platform:testuserlogin": {
            expires: Instant;
            target: string;
            userId: number;
            wrdSchema: string;
        };
        "platform:uploadsession": { chunkSize: number; manifest: UploadManifest };
        "system:oauth2": {
            client_scope?: string;
            code_verifier: string;
            error?: { error: string; error_description: string | null };
            finalreturnurl: string;
            local_user?: string;
            metadata_url?: string;
            oauthconfig: {
                authorizeurl: string;
                authtokenurl: string;
                clientid: string;
                clientsecret: string;
                clientsigning: ToSnakeCase<ClientSigning> | null;
                extra_params: { param: string; value: string }[];
                redirecturl: string;
            };
            redirect_uri?: string;
            requeststart: Date;
            scopes?: string[];
            tokeninfo?: OAuth2Tokens;
            user_data?: Record<string, unknown>;
            wrd_schema?: string;
        };
        "wrd:openid.idpstate": OIDCCallerInfo & {
            clientid: number;
            code_challenge: string
            | null;
            code_challenge_method: "S256" | "plain" | null;
            nonce: string | null;
            prompt: OAuth2PromptFlag;
            resource?: string | null;
            scopes: string[];
            user?: number;
        };
        [key: string]: Record<string, unknown>;
    }

    Indexable

    • [key: string]: Record<string, unknown>
    Index

    Properties

    "platform:incomplete-account": {
        badPasswordTime: Instant | null;
        failedchecks: PasswordCheck[];
        returnTo: string;
        user: number;
    }

    Type Declaration

    • badPasswordTime: Instant | null

      Time of the bad password

    • failedchecks: PasswordCheck[]

      Failed checks

    • returnTo: string

      Return url

    • user: number

      User id to login

    "platform:testuserlogin": {
        expires: Instant;
        target: string;
        userId: number;
        wrdSchema: string;
    }

    Type Declaration

    • expires: Instant

      When the login link expires

    • target: string

      URL to redirect to after setting the cookies

    • userId: number

      The test user to log in

    • wrdSchema: string

      Schema containing the test user

    "platform:uploadsession": { chunkSize: number; manifest: UploadManifest }
    "system:oauth2": {
        client_scope?: string;
        code_verifier: string;
        error?: { error: string; error_description: string | null };
        finalreturnurl: string;
        local_user?: string;
        metadata_url?: string;
        oauthconfig: {
            authorizeurl: string;
            authtokenurl: string;
            clientid: string;
            clientsecret: string;
            clientsigning: ToSnakeCase<ClientSigning> | null;
            extra_params: { param: string; value: string }[];
            redirecturl: string;
        };
        redirect_uri?: string;
        requeststart: Date;
        scopes?: string[];
        tokeninfo?: OAuth2Tokens;
        user_data?: Record<string, unknown>;
        wrd_schema?: string;
    }

    Type Declaration

    • Optionalclient_scope?: string
    • code_verifier: string
    • Optionalerror?: { error: string; error_description: string | null }

      Set if the authorization or token request failed

    • finalreturnurl: string
    • Optionallocal_user?: string

      Login name of the local user this authorization was completed for, if the caller recorded it

    • Optionalmetadata_url?: string
    • oauthconfig: {
          authorizeurl: string;
          authtokenurl: string;
          clientid: string;
          clientsecret: string;
          clientsigning: ToSnakeCase<ClientSigning> | null;
          extra_params: { param: string; value: string }[];
          redirecturl: string;
      }
    • Optionalredirect_uri?: string
    • requeststart: Date
    • Optionalscopes?: string[]

      Scopes requested from the authorization server (not set by HS)

    • Optionaltokeninfo?: OAuth2Tokens
    • Optionaluser_data?: Record<string, unknown>
    • Optionalwrd_schema?: string

      WRD schema of the client's wrdauthServer, if known (not set by HS)

    "wrd:openid.idpstate": OIDCCallerInfo & {
        clientid: number;
        code_challenge: string | null;
        code_challenge_method: "S256" | "plain" | null;
        nonce: string | null;
        prompt: OAuth2PromptFlag;
        resource?: string | null;
        scopes: string[];
        user?: number;
    }

    Type Declaration

    • clientid: number
    • code_challenge: string | null
    • code_challenge_method: "S256" | "plain" | null
    • nonce: string | null
    • prompt: OAuth2PromptFlag
    • Optionalresource?: string | null

      Resource (RFC 8707) the client requested a token for, null if none

    • scopes: string[]
    • Optionaluser?: number

      User id to set