interface PluginOptions {
    accessTokenExpiration?: string;
    ajv?: Ajv;
    authorizationEndpoint: string;
    includeErrorDescription?: boolean;
    isAccessTokenRevoked: (...param: [string]) => Promise<boolean>;
    issuer: string;
    jwks: {
        keys: {
            alg?: string;
            d?: string;
            dp?: string;
            dq?: string;
            e?: string;
            kid?: string;
            kty: string;
            n?: string;
            p?: string;
            q?: string;
            qi?: string;
        }[];
    };
    logPrefix?: string;
    onIssuedTokens: (
        ...param: [
            {
                access_token: string;
                access_token_expires_in: number;
                client_id: string;
                issuer: string;
                jti: string;
                kid: string;
                me: string;
                redirect_uri: string;
                refresh_token: string;
                refresh_token_expires_at: number;
                scope: string;
            },
        ],
    ) => Promise<void>;
    refreshTokenExpiration?: string;
    reportAllAjvErrors?: boolean;
    retrieveRefreshToken: (
        ...param: [string],
    ) => Promise<
        | {
            client_id: string;
            created_at: number;
            exp: number;
            id: string
            | number;
            iss: string;
            jti: string;
            me: string;
            redirect_uri: string;
            refresh_token: string;
            revocation_reason?: string;
            revoked?: boolean;
            scope: string;
        }
        | {
            client_id: string;
            created_at: null
            | number;
            deleted_at?: null | number;
            exp: number;
            id: string | number;
            iss: string;
            jti: string;
            me: string;
            redirect_uri: string;
            refresh_token: string;
            revocation_reason?: string;
            revoked?: boolean;
            scope: string;
            undeleted_at?: null | number;
            updated_at?: null | number;
        },
    >;
    revocationEndpoint: string;
    userinfoEndpoint: string;
}

Hierarchy

Properties

accessTokenExpiration?: string = ...

Human-readable expiration time for the access token. It will be shown in the consent screen.

'15 minutes'
ajv?: Ajv

AJV instance, for validation.

authorizationEndpoint: string = authorization_endpoint

Endpoint that will be called to verify an authorization code before issuing a token.

includeErrorDescription?: boolean = ...
isAccessTokenRevoked: (...param: [string]) => Promise<boolean>

Predicate function that will be called to check whether a previously issued token is revoked or not.

issuer: string
jwks: {
    keys: {
        alg?: string;
        d?: string;
        dp?: string;
        dq?: string;
        e?: string;
        kid?: string;
        kty: string;
        n?: string;
        p?: string;
        q?: string;
        qi?: string;
    }[];
} = ...
logPrefix?: string = ...
onIssuedTokens: (
    ...param: [
        {
            access_token: string;
            access_token_expires_in: number;
            client_id: string;
            issuer: string;
            jti: string;
            kid: string;
            me: string;
            redirect_uri: string;
            refresh_token: string;
            refresh_token_expires_at: number;
            scope: string;
        },
    ],
) => Promise<void>
refreshTokenExpiration?: string = ...

Human-readable expiration time for the refresh token. It will be shown in the consent screen.

'30 days'
reportAllAjvErrors?: boolean = ...
retrieveRefreshToken: (
    ...param: [string],
) => Promise<
    | {
        client_id: string;
        created_at: number;
        exp: number;
        id: string
        | number;
        iss: string;
        jti: string;
        me: string;
        redirect_uri: string;
        refresh_token: string;
        revocation_reason?: string;
        revoked?: boolean;
        scope: string;
    }
    | {
        client_id: string;
        created_at: null
        | number;
        deleted_at?: null | number;
        exp: number;
        id: string | number;
        iss: string;
        jti: string;
        me: string;
        redirect_uri: string;
        refresh_token: string;
        revocation_reason?: string;
        revoked?: boolean;
        scope: string;
        undeleted_at?: null | number;
        updated_at?: null | number;
    },
>
revocationEndpoint: string = revocation_endpoint
userinfoEndpoint: string = userinfo_endpoint