lti-tool Documentation
    Preparing search index...

    In-memory LTI storage implementation.

    ⚠️ WARNING: NOT SUITABLE FOR SERVERLESS/MULTI-INSTANCE DEPLOYMENTS

    This storage keeps all data in memory and provides no persistence. It's intended for:

    • Development and testing
    • Single-instance server deployments
    • Reference implementation

    DO NOT use in serverless environments (AWS Lambda, Vercel, etc.) as:

    • Each instance has isolated memory
    • Nonce validation becomes unreliable across instances
    • Security vulnerabilities may arise from replay attacks

    For production serverless deployments, use DynamoDbStorage or similar.

    Implements

    Index

    Constructors

    Methods

    • Adds a new client configuration to storage.

      Parameters

      • client: Omit<LTIClient, "id" | "deployments">

        Partial client configuration object

      Returns Promise<string>

    • Adds a new deployment to an existing client.

      Parameters

      • clientId: string

        Client identifier

      • deployment: Omit<LTIDeployment, "id">

        Deployment configuration to add

      Returns Promise<string>

    • Stores a new user session after successful LTI launch.

      Parameters

      • session: LTISession

        Complete session object with user, context, and service data

      Returns Promise<string>

      The session ID for reference

    • Removes a client configuration from storage.

      Parameters

      • clientId: string

        Unique client identifier

      Returns Promise<void>

    • Removes a deployment from a Client.

      Parameters

      • clientId: string

        Client identifier

      • deploymentId: string

        Deployment identifier to remove

      Returns Promise<void>

    • Removes a registration session from storage (cleanup after completion or expiration).

      Parameters

      • sessionId: string

        Unique session identifier to delete

      Returns Promise<void>

    • Retrieves client configuration by its unique id.

      Parameters

      • clientId: string

        Unique client identifier

      Returns Promise<LTIClient | undefined>

      Client configuration if found, undefined otherwise

    • Retrieves deployment configuration by client ID and deployment ID (admin use).

      Parameters

      • clientId: string

        Unique client identifier

      • deploymentId: string

        Deployment identifier

      Returns Promise<LTIDeployment | undefined>

      Deployment configuration if found, undefined otherwise

    • Parameters

      • clientId: string
      • deploymentId: string

      Returns Promise<LTIDeployment | undefined>

    • Retrieves launch configuration for LTI authentication flow.

      Parameters

      • iss: string

        Platform issuer URL (identifies the LMS)

      • clientId: string

        OAuth2 client identifier for this tool

      • deploymentId: string

        Deployment identifier within the platform

      Returns Promise<LTILaunchConfig | undefined>

      Launch configuration if found, undefined otherwise

    • Retrieves an active user session by session ID.

      Parameters

      • sessionId: string

        Unique session identifier (typically a UUID)

      Returns Promise<LTISession | undefined>

      Session object if found and valid, undefined otherwise

    • Stores a nonce with expiration time for replay attack prevention.

      Parameters

      • nonce: string

        Unique nonce value (typically a UUID)

      • expiresAt: Date

        When this nonce should be considered expired

      Returns Promise<void>

    • Updates an existing client configuration.

      Parameters

      • clientId: string

        Unique client identifier

      • client: Partial<Omit<LTIClient, "id" | "deployments">>

        Partial client object with fields to update

      Returns Promise<void>

    • Updates an existing deployment configuration.

      Parameters

      • clientId: string

        Client identifier

      • deploymentId: string

        Deployment identifier to update

      • deployment: Partial<LTIDeployment>

        Partial deployment object with fields to update

      Returns Promise<void>

    • Validates a nonce and marks it as used to prevent replay attacks.

      Parameters

      • nonce: string

        Nonce value to validate

      Returns Promise<boolean>

      true if nonce is valid and unused, false if already used or expired