MonoCloud Authentication SDK
    Preparing search index...

    Interface IIntrospectionCache

    Cache adapter for storing access token introspection results.

    Implement this interface to persist introspection results in an external store such as Redis, Memcached, or an in-memory cache.

    interface IIntrospectionCache {
        delete(key: string): Promise<void>;
        get(key: string): Promise<AccessTokenClaims | null | undefined>;
        set(
            key: string,
            claims: AccessTokenClaims,
            expiresAt: number,
        ): Promise<void>;
    }
    Index
    • Removes an entry from the cache.

      Parameters

      • key: string

        The cache key to delete.

      Returns Promise<void>

    • Stores introspected access token claims in the cache.

      Parameters

      • key: string

        The cache key (access token).

      • claims: AccessTokenClaims

        The introspected access token claims to cache.

      • expiresAt: number

        The time the entry expires, as a Unix epoch timestamp (seconds).

      Returns Promise<void>