# config/packages/lexik_jwt_authentication.yaml
lexik_jwt_authentication:
    secret_key: '%env(resolve:JWT_SECRET_KEY)%'
    public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
    pass_phrase: '%env(JWT_PASSPHRASE)%'
    token_ttl: 3600
    # Remplacer user_identity_field par user_id_claim (déprécié)
    user_id_claim: email  # Au lieu de user_identity_field: email
    clock_skew: 0
    api_platform:
        check_path: /api/login
        username_path: email
        password_path: password
    token_extractors:
        authorization_header:
            enabled: true
            prefix: Bearer
            name: Authorization
        cookie:
            enabled: true
            name: BEARER
        query_parameter:
            enabled: true
            name: bearer
    encoder:
        service: lexik_jwt_authentication.encoder.lcobucci
        signature_algorithm: RS256
    set_cookies:
        BEARER:
            lifetime: 3600
            samesite: lax
            path: /
            domain: '%env(COOKIE_DOMAIN)%'
            secure: true
            httpOnly: true