Class TestSecurityUtils
- java.lang.Object
-
- com.flowable.core.spring.security.test.TestSecurityUtils
-
public class TestSecurityUtils extends Object
A utility class that can be used when writing tests. Do not use this for other purposes than tests, as it will set a non-persisted user as the threadlocal for the Spring Security context.- Author:
- Joram Barrez
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidresetTestAuthenticatedUser()static voidsetTestAuthenticatedUser(String userId)static voidsetTestAuthenticatedUser(String userId, String tenantId)static voidsetTestAuthenticatedUser(String userId, String tenantId, String... groupKeys)
-
-
-
Method Detail
-
setTestAuthenticatedUser
public static void setTestAuthenticatedUser(String userId, String tenantId)
-
setTestAuthenticatedUser
public static void setTestAuthenticatedUser(String userId, String tenantId, String... groupKeys)
-
setTestAuthenticatedUser
public static void setTestAuthenticatedUser(String userId)
-
resetTestAuthenticatedUser
public static void resetTestAuthenticatedUser()
-
-