New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

kevinsimard/laravel-cookieless-session

Laravel middleware to start a cookieless session
17,034 14
Install
composer require kevinsimard/laravel-cookieless-session
Latest Version:v1.2.4
Laravel:5
License:MIT
Last Updated:Jun 3, 2023
Links: GitHub  ·  Packagist
Maintainer: kevinsimard

Laravel Cookieless Session Middleware

All you need to do is to add the following key X-Session-Token to your requests" headers to load sessions.

Installation

Replace the original start session middleware in app/Http/Kernel.php.

<?php namespace App\Http;

use Illuminate\Foundation\Http;

class Kernel extends Http\Kernel
{
    /**
     * @var array
     */
    protected $middleware = [
        //"Illuminate\Session\Middleware\StartSession",
        "Kevinsimard\CookielessSession\Middleware\StartSession",
        ...
    ];
...

Replace the original session service provider in config/app.php.

"providers" => [
    ...
    //"Illuminate\Session\SessionServiceProvider",
    "Kevinsimard\CookielessSession\Providers\SessionServiceProvider",
    ...
],

Code Structure

├── src
│   └── Kevinsimard
│       └── CookielessSession
│           ├── Middleware
│           │   └── StartSession.php
│           └── Providers
│               └── SessionServiceProvider.php
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── composer.json

License

This package is open-sourced software licensed under the MIT license.

Related Packages

rairlie/laravel-locking-session

Provide session locking in Laravel

521,845 91
cedricve/lockfile

A session driver which properly locks the file session driver for Laravel

13,113 2
agenter-labs/illuminate-token

Token manager Laravel

3,112 1
xaamin/jwt

PHP Implementation of JSON Web token with RSA

10,404 2
codezero/session

Manage session data.

2,821 0

Version History

Version Released Laravel License
v1.2.4 5.2.*|5.3.* MIT
v1.2.3 5.x MIT