Download the PHP package code202/security-bundle without Composer
On this page you can find all versions of the php package code202/security-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download code202/security-bundle
More information about code202/security-bundle
Files in code202/security-bundle
Package security-bundle
Short Description Provides user management for Symfony Project.
License MIT
Informations about the package security-bundle
security-bundle
Provides user management for Symfony Project.
Configuration
Security
Minimum configuration in config/security.yaml
file for your securited firewall :
You also can disable or configure an authentication way like this :
User provider
To fully use the bundle, don't forget to use our dedicated user provider
Routing
Add to folowing route in your routing.yaml
:
Prefix has to correspond to your firewall pattern !
Uuid
You have to choose how to generate and validate UUID.
Your service name have to respectivly implements Code202\Security\Uuid\UuidGeneratorInterface and Code202\Security\Uuid\UuidValidatorInterface
You also can use these values ramsey/uuid
or symfony/polyfill-uuid
(default) if you use the corresponding packages.
Session TTL
You can provide differents values of Time To Live for the differents authentications ways, the default value is 3600 seconds.
Token By Email
You can configure the 'token_by_email' authentication behavior :
Token Generator
If you choose to use the default token generaotr, you can configure it with :
Roles Strategies
The roles strategies explains which roles can be grant and revoke with which conditions. For example :
By default, if to_revoke
option in note define, the to_grant
option is apply for revoke conditions.
Bridges
Nelmio/ApiDocBundle
This bundle already use OpenApi attributes. The best way to use it is to import our configuration in your nelmio-apièdoc.yaml
file
In cases where you change key, password or remember_me parameters on authenticators, you can override this configuration like this :
You can add these route in your configuration to show login routes in your API documentation:
Dev notes
Use docker container
Export .home-developer path to $DEV
Launch container
To clean code
You can use --dry
option
All versions of security-bundle with dependencies
doctrine/orm Version ^2.15||^3.0
pagerfanta/core Version ^4.3.1
pagerfanta/doctrine-orm-adapter Version ^4.3.1
ramsey/collection Version ^2.0
symfony/console Version 6.4.*||^7.0
symfony/expression-language Version 6.4.*||^7.0
symfony/form Version 6.4.*||^7.0
symfony/polyfill-uuid Version ~1.27
symfony/property-access Version 6.4.*||^7.0
symfony/security-bundle Version 6.4.*||^7.0
symfony/serializer Version 6.4.*||^7.0
symfony/validator Version 6.4.*||^7.0
symfony/yaml Version 6.4.*||^7.0
zircote/swagger-php Version ^4.7
symfony/routing Version 6.4.*||^7.0
symfony/doctrine-bridge Version 6.4.*||^7.0