Interface TokenCache

Interface to implement token caching.

interface TokenCache {
    get: (() => null | {
        accessToken: string;
        expires: number;
    });
    set: ((token: string, expires: number) => void);
}

Properties

Properties

get: (() => null | {
    accessToken: string;
    expires: number;
})

Get a token and expiration timestamp from storage.

set: ((token: string, expires: number) => void)

Put a token and expiration timestamp into storage.