• Home
  • News
  • Articles
  • Books
  • Videos
  • Hubs
  • Channels
  • EN
  • RU
  • 17 May, 25
  • About
  • Contact
DotDev
  • Home
  • News
  • Articles
  • Books
  • Videos
  • Hubs
  • Channels
  1. DotDev
  2. Articles
  3. New in Symfony 6.4: Impersonation Utilities

New in Symfony 6.4: Impersonation Utilities

Symfony *

User impersonation is a popular Symfony security feature that allows you to log in in the application as another user without knowing their credentials. It's mostly useful to debug issues reported by your customers that you can't reproduce with your own user.

Symfony provides some Twig functions to ease working with user impersonation: impersonation_exit_path() and impersonation_exit_url(). These functions generate the relative and absolute URL that you need to browse to exit or stop the impersonation and return back to your own user.

In Symfony 6.4 we're adding new Twig functions related to impersonation. They are called impersonation_path() and impersonation_url() and they generate the relative/absolute URL needed to impersonate a user:

Using these functions is more future-proof than generating the paths/URLs manually, because the query string parameter included in them is a "magic string" that is configurable in the application.

Tags
Articles Web Symfony Api Application HTML
  • 27 Oct, 23
  • 0 comments
  • 744 reads
Source
https://symfony.com/blog/new-in-symfony-6-4-impersonation-utilities
SHARE:

Joe Black
Joe Black

News Author

Comments
  • 1000+
    Subscriptions
  • 1000+
    Followers
  • 1000+
    Followers
Tags
  • Python (230)
  • Программирование (181)
  • 2022 (170)
  • 2020 (151)
  • 2023 (149)
  • 2021 (128)
  • Java (128)
  • Linux (119)
  • 2019 (117)
  • Алгоритмы (112)
  • JavaScript (100)
  • Сети (99)
  • Api (92)
  • Инструменты (90)
  • Web (86)
  • Applications (79)
  • Microsoft (73)
  • PHP (73)
  • Google (72)
  • Обучение (72)
  • 2018 (68)
  • SQL (68)
  • C# (66)
  • ИИ (63)
  • Windows (60)
  • HTML (59)
  • 2017 (55)
  • C++ (53)
  • Базы данных (53)
  • Machine Learning (51)
  • Kubernetes (50)
  • Go (47)
  • Бизнес (47)
  • Паттерны (46)
  • CSS (44)
  • Проекты (42)
  • 2016 (41)
  • ИБ (41)
  • ОС (40)
  • .NET (39)
  • DevOps (39)
  • Docker (39)
  • React (39)
  • Проектирование (38)
  • Тестирование (38)
  • Математика (36)
  • Android (35)
  • Структуры Данных (35)
  • Информатика (34)
  • Framework (32)
Socials
  • Terms of Use
  • Privacy Policy
  • About
  • Contact

© 2025. DotDev — articles and lessons about IT programming and technology.