Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jwt Session Bundle Laravel Package

dorcyv/jwt-session-bundle

View on GitHub
Deep Wiki
Context7

JwtSessionBundle

JwtSessionBundle is a PHP session replacement. Instead of use FileSystem, just use Json Web Token. Compatible with Symfony 3.4 and 4

Motivation

The default PHP Session does not work in different servers using round robin or other algorithms. This occurs because PHP Session are saved by default in the file system.

There are implementations can save the session to REDIS or MEMCACHED, for example. But this requires to you create a new server to store this session and creates a single point of failure. To avoid this you have to create REDIS/MEMCACHED clusters.

But if you save the session into JWT Token you do not need to create a new server. Just to use.

Security information

The JWT Token cannot be changed, but it can be read. This implementation save the JWT into a client cookie. Because of this do not store in the JWT Token sensible data like passwords.

Installation

Run composer require dorcyv/jwt-session-bundle

Set the session handler in the config/packages/framework.yaml file:

framework:
    session:
        handler_id: Dorcyv\JwtSessionBundle\Session\JwtSessionHandler

That's it !

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin