Download the PHP package kinetis/session without Composer

On this page you can find all versions of the php package kinetis/session. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package session

kinetis/session
Cookie-backed sessions and CSRF protection for Kinetis

Packagist Version Packagist Downloads PHP Version License CI


Part of Kinetis, a non-blocking PHP framework for API-first applications, developed in the kinetis-dev/kinetis monorepo.

The browser-application counterpart to the token-based kinetis/auth and kinetis/auth-jwt packages: one store interface, three storage drivers, and two route middlewares.

Sessions load lazily and persist only when written: a route that never touches its session performs no storage round trip and sends no cookie. Session values are JSON-serializable application data: every store projects the session to JSON, and a read decodes it back to plain arrays and scalars. Concurrent updates of one live session are last-write-wins by design (no session locking to serialize a browser's parallel requests), and removing a stored id is terminal: a request writing back the unchanged id it read has that write refused, and sends no cookie, once a logout or rotation has removed it, so a stale write cannot recreate a retired id. A concurrent request that calls regenerate() itself writes under a new id and is not coordinated with that logout.

A cookie id that is wellformed but unknown to the store — fabricated, or expired — is never trusted as-is: the first real access rotates it to a fresh id before anything can be exposed or written under it, and that rotation persists nothing until something needs a stable identity, so checking a CSRF token can never be what allocates a session. Session::regenerate() is the complementary session-fixation defense for a known, previously-issued id — call it on login. It rotates the CSRF token with the id, keeping every application key, so a form rendered before the privilege change needs re-rendering with the new token. Full rules: kinetis.dev/docs/session.html.

Provides

Installing this package auto-registers, via extra.kinetis:

Nothing else. Both middlewares are explicit opt-ins attached per route or controller — SessionMiddleware registers the request's Session on the request scope, CsrfMiddleware (stacked after it) enforces a synchronizer token on state-changing methods via X-CSRF-Token or a form's _token field, with hash_equals() comparison.

Configuration

Key Default Purpose
SESSION_DRIVER — file, redis, or sql; unset = inert.
SESSION_LIFETIME 7200 Seconds a session stays readable from its last write — the cookie's Max-Age and the store's own TTL always refresh together.
SESSION_COOKIE kinetis_session Cookie name. A __Host-/__Secure- prefix requires SESSION_SECURE.
SESSION_SAMESITE Lax Cookie SameSite attribute: Strict, Lax, or None, any casing. None requires SESSION_SECURE.
SESSION_SECURE true Cookie Secure attribute — false only for non-TLS local dev.
SESSION_FILES_DIR system temp The file driver's directory.

Installation

Requires PHP 8.4+ and kinetis/framework. Full documentation: kinetis.dev/docs/session.html.

License

MIT — see LICENSE.


All versions of session with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
kinetis/framework Version ^1.21.0
psr/simple-cache Version ^3.0.0
psr/http-message Version ^2.0
psr/http-server-middleware Version ^1.0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kinetis/session contains the following files

Loading the files please wait ...