Class SecurityContextRequestPostProcessorSupport

java.lang.Object
com.c4_soft.springaddons.security.oauth2.test.mockmvc.SecurityContextRequestPostProcessorSupport

public class SecurityContextRequestPostProcessorSupport
extends Object
Not visible in springframework (and method not static)
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  SecurityContextRequestPostProcessorSupport.TestSecurityContextRepository
    Used to wrap the SecurityContextRepository to provide support for testing in stateless mode
  • Constructor Summary

    Constructors 
    Constructor Description
    SecurityContextRequestPostProcessorSupport()  
  • Method Summary

    Modifier and Type Method Description
    static void save​(org.springframework.security.core.Authentication authentication, javax.servlet.http.HttpServletRequest request)
    Saves the specified Authentication into an empty SecurityContext using the SecurityContextRepository.
    static void save​(org.springframework.security.core.context.SecurityContext securityContext, javax.servlet.http.HttpServletRequest request)
    Saves the SecurityContext using the SecurityContextRepository

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • save

      public static final void save​(org.springframework.security.core.Authentication authentication, javax.servlet.http.HttpServletRequest request)
      Saves the specified Authentication into an empty SecurityContext using the SecurityContextRepository.
      Parameters:
      authentication - the Authentication to save
      request - the HttpServletRequest to use
    • save

      public static final void save​(org.springframework.security.core.context.SecurityContext securityContext, javax.servlet.http.HttpServletRequest request)
      Saves the SecurityContext using the SecurityContextRepository
      Parameters:
      securityContext - the SecurityContext to save
      request - the HttpServletRequest to use