Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.55 KB

UPGRADE-2.12.md

File metadata and controls

50 lines (37 loc) · 1.55 KB

UPGRADE FROM 2.11 to 2.12

Configuration

  • A new authenticator has been introduced for projects running on Symfony 5.3 with the new security-http' authenticator system.

    If you are using Symfony 5.3+ then consider updating your security configuration as follows.

    Before:

    # config/packages/security.yaml
    
    security:
        firewalls:
            api:
                pattern: ^/api
                guard:
                    authenticators: 
                        - lexik_jwt_authentication.jwt_token_authenticator

    After:

    # config/packages/security.yaml
    
    security:
        enable_authenticator_manager: true
        firewalls:
            api:
                pattern: ^/api
                jwt: ~

    Note
    The changes above are related to this bundle only. The new jwt authenticator behaves the same as the guard one, but you need to take care of upgrading the rest of your security configuration according to the new authenticator system.
    For more information, check https://symfony.com/doc/current/security/authenticator_manager.html.

API

  • Added method JWTTokenManagerInterface::parse() which takes the raw token as only argument. Consider using this method over decode() as it is more inline with the new Symfony authenticator system.
    The JWTTokenManagerInterface::decode() method may be deprecated in a future version.

  • Added class Security\Authenticator\JWTAuthenticator that is wired by the JWTAuthenticatorFactory class.