【发布时间】:2015-02-16 17:02:22
【问题描述】:
我使用 Spring Security SwitchUserFilter 编写了功能。在应用程序中,我可以使用/j_spring_security_switch_user?j_username=xxx URL 切换用户并使用/j_spring_security_exit_user 返回上一个。
我还实现了几种取决于切换用户的方法,所以我想为它们编写单元测试。
因此我的问题是如何在 jUnit 测试环境中切换用户?
【问题讨论】:
标签: java spring junit spring-security