{
    "source": "session.js",
    "input-schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
            "secret": {
                "type": "string",
                "required": true,
                "description": "Secret used to sign the session ID cookie"
            },
            "store": {
                "type": "object",
                "properties": {}
            },
            "cookie": {
                "type": "object",
                "additionalProperties": false,
                "description": "Cookie configuration",
                "displayOptions" : {
                  "showCollapsed": "true"
                },
                "properties": {
                    "path": {
                        "type": "string",
                        "default": "\"/\"",
                        "description": "By default, this is set to '/', which is the root path of the domain"
                    },
                    "maxAge": {
                        "type": "integer",
                        "default": null,
                        "description": "Specifies the number (in milliseconds) to calculate the Expires Datetime based on the current server time"
                    },
                    "domain": {
                        "type": "string",
                        "description": "Specifty the domain to be applied for the cookie"
                    },
                    "expires": {
                        "type": "string",
                        "description": "By default, no expiration is set, and most clients will consider this a 'non-persistent cookie' and will delete it on a condition like exiting a web browser application."
                    },
                    "httpOnly": {
                        "type": "boolean",
                        "default": true,
                        "format": "plain"
                    },
                    "secure": {
                        "type": "boolean",
                        "format": "plain"
                    },
                    "sameSite": {
                        "type": "string",
                        "format": "choice",
                        "choice": [
                            {"label": "", "value": ""},
                            {"label": "LAX", "value": "\"lax\""},
                            {"label": "STRICT", "value": "\"strict\""},
                            {"label": "NONE", "value": "\"none\""}
                        ],
                        "description": "'Strict' for strict and 'Lax' for relaxed same site enforcement, 'None' for an explicit cross-site cookie"
                    }
                }
            },
            "name": {
                "type": "string",
                "default": "\"connect.sid\"",
                "description": "The name of the session ID cookie to set in the response (and read from in the request)."
            },
            "proxy": {
                "type": "boolean",
                "default": null,
                "format": "plain",
                "description": "Trust the reverse proxy when setting secure cookies (via the 'X-Forwarded-Proto' header)"
            },
            "resave": {
                "type": "boolean",
                "default": true,
                "format": "plain",
                "description": "Set the session to be saved back to the session store, even if there are no modifications during the request"
            },
            "rolling": {
                "type": "boolean",
                "format": "plain",
                "default": true,
                "description": "Set the session in every response, resetting the expiration countdown based on maxAge"
            },
            "saveUninitialized": {
                "type": "boolean",
                "default": true,
                "format": "plain",
                "description": "Enable session that is 'uninitialized' to be saved to the store. A session is uninitialized when it is new but not modified. Choosing false is useful for implementing login sessions, reducing server storage usage, or complying with laws that require permission before setting a cookie"
            },
            "unset": {
                "type": "string",
                "format": "choice",
                "choice": [
                    {"label": "Keep", "value": "\"keep\""},
                    {"label": "Destroy", "value": "\"destroy\""}
                ],
                "default": "\"keep\"",
                "description": "Control how unsetting req.session (through delete, setting to null, etc.) handles session. 'destroy':The session will be destroyed (deleted) when the response ends. 'keep':The session in the store will be kept, but modifications during the request are dropped"
            }
        }
    },
    "output-schema": {
        "type": "any"
    },
    "meta": {
        "name": "sessionInterface",
        "isInterface": true
    }
}