NAME

Prancer::Session::State::Cookie

SYNOPSIS

This package implements a session state handler that will keep track of sessions by adding a cookie into the response headers and reading cookies in the request headers. You must enable this if you want sessions to work.

To use this session state handler, add this to your configuration file:

session:
    state:
        driver: Prancer::Session::State::Cookie
        options:
            key: PSESSION
            path: /
            domain: .example.com
            expires: 1800
            secure: 1
            httponly: 1

OPTIONS

key

The name of the cookie. The default is PSESSION.

path

The path of the cookie. This defaults to "/".

domain

The domain for the cookie. If this is not set then it will not be included in the cookie.

expires

The expiration time of the cookie in seconds. If this is not set then it will not be included in the cookie which means that sessions will expire at the end of the user's browser session.

secure

The secure flag for the cookie. If this is not set then it will not be included in the cookie. If this is set to a true value then the cookie will only be transmitted over secure connections.

httponly

The HttpOnly flag for the cookie. If this is not set then it will not be included in the cookie. If this is set to a true value then the cookie will only be accessible by the server and not by, say, JavaScript.