1 Star 0 Fork 0

Tenny / fastify-session

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.d.ts 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
haoran.shu 提交于 2021-04-27 18:24 . feat(0.0.1): 初始上传
/**
* Copyright (c) [2021] [tenny]
[fastify-pithy-session] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
import { FastifyPlugin } from 'fastify';
declare module 'fastify' {
interface FastifyRequest {
prevSessionHash: string;
session: unknown;
prevSessionExpire?: {
expire: number;
maxAge: number;
};
}
}
export interface FastifySessionOptions {
key?: string;
rolling?: boolean;
renew?: boolean;
cookie?: {
domain?: string;
encode?(val: string): string;
expires?: Date;
httpOnly?: boolean;
maxAge?: number;
path?: string;
sameSite?: boolean | 'lax' | 'strict' | 'none';
secure?: boolean;
signed?: boolean;
};
}
declare const fastifySession: FastifyPlugin<FastifySessionOptions>;
export default fastifySession;
NodeJS
1
https://gitee.com/towardly/fastify-session.git
git@gitee.com:towardly/fastify-session.git
towardly
fastify-session
fastify-session
master

搜索帮助