Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AtomicPosts - JWT - security
// source app/config/security.yml
security:
encoders:
AppBundle\Entity\User: bcrypt
providers:
api_provider:
entity:
class: AppBundle:User
firewalls:
api:
pattern: ^/api/
guard:
authenticators:
- app.jwt_token_authenticator
anonymous: true
access_control:
- { path: /api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api, roles: [ROLE_API] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.