Interface WithSecurityContextFactory<A extends Annotation>

Type Parameters:
A -

public interface WithSecurityContextFactory<A extends Annotation>
An API that works with WithUserTestExcecutionListener for creating a SecurityContext that is populated in the TestSecurityContextHolder.
Since:
4.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.core.context.SecurityContext
    Create a SecurityContext given an Annotation.
  • Method Details

    • createSecurityContext

      org.springframework.security.core.context.SecurityContext createSecurityContext(A annotation)
      Create a SecurityContext given an Annotation.
      Parameters:
      annotation - the Annotation to create the SecurityContext from. Cannot be null.
      Returns:
      the SecurityContext to use. Cannot be null.