SHARE
TWEET

Untitled

a guest Nov 6th, 2018 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Value("${security.enabled:true}")
  2. private boolean securityEnabled;
  3.  
  4. @Override
  5. protected void configure(HttpSecurity pHttpSecurity) throws Exception
  6. {
  7.     if (!securityEnabled)
  8.     {
  9.         return;
  10.     }
  11.    
  12. @WithMockUser(username = "admin", roles = "ADMIN")
  13.    
  14. MockHttpServletRequest:
  15.   HTTP Method = POST
  16.   Request URI = /admin/createUser
  17.    Parameters = {}
  18.       Headers = {Content-Type=[application/json]}
  19.          Body = <no character encoding set>
  20. Session Attrs = {SPRING_SECURITY_CONTEXT=org.springframework.security.core.context.SecurityContextImpl@e0791834:
  21.                  Authentication: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@e0791834:
  22.                  Principal: org.springframework.security.core.userdetails.User@586034f:
  23.                  Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true;
  24.                  credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_ADMIN;
  25.                  Credentials: [PROTECTED]; Authenticated: true; Details: null; Granted Authorities: ROLE_ADMIN}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top