如何在测试和开发过程中保护 symfony 项目密码 [英] How to make symfony project password protected during testing and development

查看:31
本文介绍了如何在测试和开发过程中保护 symfony 项目密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个 symfony2 项目.我想在测试和开发过程中保护这个项目的密码.换句话说,我想让项目密码受到保护,直到它完全测试,并且已经发布.有没有办法做到这一点?请帮忙.提前致谢.

I have developed a symfony2 project. I want to make this project password protected during testing and development. In other words, I want to make the project password protected until it is completely tested, and it has been published. Is there some way to do this? Please help. Thanks in advance.

推荐答案

您可以轻松地为每个环境配置不同的安全组件.只需打开相应的配置文件,例如 config_dev.yml 并添加/覆盖相应的安全配置,例如:

You can easily configure the Security component differently for each environment. Just open up the appropriate config file, for example config_dev.yml and add/overwrite the appropriate security configuration, for example:

security:
    providers:
        my_provider:
            memory:
                users:
                    foo: { password: foo, roles: ROLE_USER }
    firewalls:
        your_firewall_name:
            http_basic: ~

这篇关于如何在测试和开发过程中保护 symfony 项目密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆