Skip to content

Commit

Permalink
docs: expand req.session documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jul 2, 2015
1 parent 5d3a73c commit 5117478
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Expand Up @@ -66,9 +66,17 @@ The options can also contain any of the follow (for the full list, see
- `signed`: a boolean indicating whether the cookie is to be signed (`false` by default). If this is true, another cookie of the same name with the `.sig` suffix appended will also be sent, with a 27-byte url-safe base64 SHA1 value representing the hash of _cookie-name_=_cookie-value_ against the first [Keygrip](https://github.com/expressjs/keygrip) key. This signature key is used to detect tampering the next time a cookie is received.
- `overwrite`: a boolean indicating whether to overwrite previously set cookies of the same name (`true` by default). If this is true, all cookies set during the same request with the same name (regardless of path or domain) are filtered out of the Set-Cookie header when setting this cookie.

### req.session.isNew
### req.session

Is `true` if the session is new.
Represents the session for the given request.

#### .isNew

Is `true` if the session is new.

#### .populated

Determine if the session has been populated with data or is empty.

### Destroying a session

Expand Down

0 comments on commit 5117478

Please sign in to comment.