首页 > TAG信息列表 > security-context

php – Symfony2功能测试中的用户令牌

我正在对Symfony2控制器进行功能测试,继承我的测试类: class InsecureWebTestCase extends WebTestCase { protected $client = null; public function setUp() { $this->client = static::createClient(); $session = $this->client->getContainer()->g

如果我禁用了authorizarion,如何在测试中模拟安全上下文

我有这样的测试: @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) @ActiveProfiles("test") public class MyTests { @Autowired

Spring Security:不支持身份验证方法:GET

我不知道我错过了什么,非常感谢你对那个人的帮助! 登录尝试后,我收到“不支持身份验证方法:GET”消息. 这是我的security-Context.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.or