hapi-hazelcast-session
Server-side session for hapi, stored in Hazelcast cache server. Based on hapi-server-session.
Install
$ npm install hapi-hazelcast-session
Example
'use strict'; const hapi = ; const main = async { const server = host: 'localhost' address: '127.0.0.1' port: 8000 ; await server; server; await serverstart;}; ;
Options
host: '127.0.0.1',
login: 'cluster_login',
password: 'cluster_password',
-
host
: [Default:'127.0.0.1'
] host of the Hazelcast server -
login
: [Default:''
] group name of the Hazelcast server -
password
: [Default:''
] password of the Hazelcast server -
algorithm
: [Default:'sha256'
] algorithm to use during signing -
cache
: supports the same options asserver.cache(options)
expiresIn
: [Default: sessionexpiresIn
if set or2147483647
] session cache expiration in millisecondssegment
: [Default:'session'
] session cache segment
-
cookie
: supports the same options asserver.state(name, [options])
isSameSite
: [Default:'Lax'
] sets theSameSite
flagpath
: [Default:'/'
] sets thePath
flagttl
: [Default: sessionexpiresIn
if set] sets theExpires
andMax-Age
flags
-
expiresIn
: session expiration in milliseconds -
name
: [Default:'id'
] name of the cookie -
key
: signing key. Prevents weaknesses in randomness from affecting overall security -
size
: [Default:16
] number of random bytes in the session id