MonoCloud Authentication SDK
    Preparing search index...

    Cache adapter for storing validated access token claims.

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

    interface ICache {
        delete(key: string): Promise<void>;
        get(key: string): Promise<AccessTokenClaims | null | undefined>;
        set(
            key: string,
            claims: AccessTokenClaims,
            expiresAt: number,
        ): Promise<void>;
    }
    Index
    • Stores validated claims in the cache.

      Parameters

      • key: string

        The cache key (access token).

      • claims: AccessTokenClaims

        The validated access token claims to cache.

      • expiresAt: number

        The token's expiration time as a Unix epoch timestamp (seconds).

      Returns Promise<void>