3.1.10 • Published 8 months ago

@foundriesio/web-session v3.1.10

Weekly downloads
154
License
Apache-2.0
Repository
github
Last release
8 months 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.10

8 months ago

3.1.9

9 months ago

3.1.3

1 year ago

3.1.7

10 months ago

3.1.6

11 months ago

3.1.5

12 months ago

3.1.4

1 year ago

3.1.8

10 months ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.18

1 year ago

3.0.17

1 year ago

3.0.16

1 year ago

3.0.15

1 year ago

3.0.12

2 years ago

3.0.13

2 years ago

3.0.10

2 years ago

3.0.11

2 years ago

3.0.14

2 years ago

3.0.9

2 years ago

3.0.8

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.2.8

2 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.5

2 years ago

2.2.4

3 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.2.1

3 years ago

2.1.13

3 years ago

2.1.9

3 years ago

2.1.12

3 years ago

2.1.10

3 years ago

2.1.11

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.2

3 years ago

2.1.3

3 years ago

2.0.37

3 years ago

2.0.38

3 years ago

2.0.36

3 years ago

2.0.39

3 years ago

2.0.40

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.35

4 years ago

2.0.33

4 years ago

2.0.34

4 years ago

2.0.32

4 years ago

2.0.31

4 years ago

2.0.30

4 years ago

2.0.29

4 years ago

2.0.28

4 years ago

2.0.27

4 years ago

2.0.26

4 years ago

2.0.25

4 years ago

2.0.24

4 years ago

2.0.23

4 years ago

2.0.22

4 years ago

2.0.21

4 years ago

2.0.20

4 years ago

2.0.19

4 years ago

2.0.18

4 years ago

2.0.17

4 years ago

2.0.16

4 years ago

2.0.15

4 years ago

2.0.13

4 years ago

2.0.14

4 years ago

2.0.11

4 years ago

2.0.12

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.4.14

4 years ago

1.4.13

4 years ago

1.4.12

4 years ago

1.4.11

4 years ago

1.4.10

4 years ago

1.4.9

4 years ago

1.4.8

4 years ago

1.4.7

4 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago