3.1.2 • Published 2 days ago

@foundriesio/web-session v3.1.2

Weekly downloads
154
License
Apache-2.0
Repository
github
Last release
2 days ago

An express-session based session handler for express web applications.

It is based on the redis session store.

How to use it

import session from '@foundriesio/web-session';

import log from 'log' // Provide a log function.
import redisClient from 'redis-client' // Provide a redis client.

return session(redisClient, log);

Configuration

Via a JSON file with the following structure:

{
  "cookie": {
    "domain": "The cookie domain name, defaults to localhost",
    "secure": "If the cookie should be secure (like HTTPS only), defaults to false",
    "maxAge": "The cookie max age, defaults to 3 days"
  },
  "session": {
    "secret": "The server side session secret, defaults to 'taco cat'",
    "prefix": "The previs for the session key, defaults to 'sid:'",
    "name": "The name of the session key, defaults to 'sid'"
  }
}

The JSON file can be defined using the FIO_CONFIG_FILE environment variable:

export FIO_CONFIG_FILE="/path/to/config.json"

Or using the following environment variable:

  • FIO_COOKIE_DOMAIN: The cookie domain name, defaults to localhost (string).
  • FIO_COOKIE_SECURE: If the cookie should be secure (HTTPS-only), defaults to false (boolean).
  • FIO_COOKIE_MAXAGE: The cookie max age, defaults to 3 days (string or number, string can also be specified as 3 days).
  • FIO_SESSION_SECRET: The server side session secret, defaults to taco cat (string).
  • FIO_SESSION_NAME: The name of the session key, defaults to sid (string).
  • FIO_SESSION_PREFIX: The prefix for the session key, defaults to sid: (string).
3.1.2

2 days ago

3.1.1

26 days ago

3.1.0

2 months ago

3.0.18

2 months ago

3.0.17

3 months ago

3.0.16

3 months ago

3.0.15

5 months ago

3.0.12

7 months ago

3.0.13

6 months ago

3.0.10

9 months ago

3.0.11

8 months ago

3.0.14

6 months ago

3.0.9

10 months ago

3.0.8

11 months ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.7

11 months ago

3.0.6

12 months ago

3.0.5

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.2.8

1 year ago

2.2.3

1 year ago

2.2.2

2 years ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.2.1

2 years ago

2.1.13

2 years ago

2.1.9

2 years ago

2.1.12

2 years ago

2.1.10

2 years ago

2.1.11

2 years ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.4

2 years ago

2.1.2

2 years ago

2.1.3

2 years ago

2.0.37

2 years ago

2.0.38

2 years ago

2.0.36

2 years ago

2.0.39

2 years ago

2.0.40

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.35

2 years ago

2.0.33

2 years ago

2.0.34

2 years ago

2.0.32

2 years ago

2.0.31

3 years ago

2.0.30

3 years ago

2.0.29

3 years ago

2.0.28

3 years ago

2.0.27

3 years ago

2.0.26

3 years ago

2.0.25

3 years ago

2.0.24

3 years ago

2.0.23

3 years ago

2.0.22

3 years ago

2.0.21

3 years ago

2.0.20

3 years ago

2.0.19

3 years ago

2.0.18

3 years ago

2.0.17

3 years ago

2.0.16

3 years ago

2.0.15

3 years ago

2.0.13

3 years ago

2.0.14

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.14

3 years ago

1.4.13

3 years ago

1.4.12

3 years ago

1.4.11

3 years ago

1.4.10

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.7

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

4 years ago

1.2.11

4 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago