2017 © Pedro Peláez
 

symfony-bundle user-single-session-bundle

Symfony RequestumUserSingleSessionBundle

image

requestum/user-single-session-bundle

Symfony RequestumUserSingleSessionBundle

  • Thursday, August 25, 2016
  • by admins@requestum.com
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

requestum/user-single-session-bundle

DESCRIPTION

RequestumUserSingleSessionBundle logout user if under his account entered again., (*1)

RequestumUserSingleSessionBundle is storage agnostic, meaning it can work with several storage mechanisms. Bundle works with User entity. You may use a Custom implementation of User class, or one based on the FOSUserBundle., (*2)

INSTALLATION

Use composer to manage your dependencies and download RequestumUserSingleSessionBundle., (*3)

Add this code to you composer.json file:, (*4)

"require": {
        ...
        "requestum/user-single-session-bundle": "dev-master"
}

And add this code to repository section:, (*5)

"repositories": [
        ...
        {
            "type": "git",
            "url": "git@gitlab.requestum.com:yadviha.khoshtaria/single-session-bundle.git"
        }
]

Then only run composer update or php composer.phar update command in root of your project., (*6)

CONFIGURATION

YAML:, (*7)

    requestum_user_single_session:
        storage: ???
        failure_action:
            type: ???
            template: ???

DOCUMENTATION

Option storage:

Option storage is configure what storage you want use for storing tokens. By default allow two values: memcached and entity. If option had not set by default using entity value., (*8)

    requestum_user_single_session:
        storage: ???
        ...

If you chose entity storage. You User entity must implements SingleSessionUserInterface, (*9)

If you chose memcached storage. You must add to you parameters.yml next code:, (*10)

# Default host and port for memcached

memcached.servers:
        ...
        - { host: 127.0.0.1, port: 11211 }
        ...

If you want using you own storage? you only need create service that is implementation of TokenIdManagerInterface and write its id in storage: option., (*11)

Option failure_action:

Option failure_action is configure what must doing bundle if user account re-authorized. Option type is required and can takes logout or view values., (*12)

requestum_user_single_session:
            failure_action:

                    # Required option
                    type:

                    # Required if choose 'view' type
                    template:

Option template: required if choose type: view and accepts a template address., (*13)

If you chose logout type, you must have logout route in you application., (*14)

The Versions

25/08 2016

dev-master

9999999-dev

Symfony RequestumUserSingleSessionBundle

  Sources   Download

The Requires

 

by Sergey Stavichenko
by Alexey Bychek
by Yadviha Khoshtaria

security