micore / api-security-bundle
Symfony bundle
1.0.3
2020-06-26 07:45 UTC
Requires
- php: ^7.2.5
- micore/api-bundle: *
- symfony/framework-bundle: *
- symfony/security-bundle: *
Requires (Dev)
- micore/kernel-test: ^1.3
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-10-26 17:18:53 UTC
README
// config/packages/security.yaml
providers:
users:
entity:
class: 'App\Entity\User'
property: 'username'
users_by_token:
entity:
class: 'App\Entity\User'
property: 'token'
token:
provider: users_by_token
guard:
authenticators:
- MiCore\ApiSecurityBundle\Security\TokenAuthenticator
access_denied_handler: MiCore\ApiSecurityBundle\Security\ApiAccessDeniedHandler
stateless: true
user_name:
provider: users
guard:
authenticators:
- MiCore\ApiSecurityBundle\Security\LoginAuthenticator
stateless: true