public static final class SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor
extends java.lang.Object
implements org.springframework.test.web.servlet.request.RequestPostProcessor
| Modifier and Type | Method and Description |
|---|---|
SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor |
authorities(java.util.Collection<org.springframework.security.core.GrantedAuthority> authorities)
Use the provided authorities in the token
|
SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor |
authorities(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,java.util.Collection<org.springframework.security.core.GrantedAuthority>> authoritiesConverter)
Provides the configured
Jwt so that custom authorities can be derived
from it |
SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor |
authorities(org.springframework.security.core.GrantedAuthority... authorities)
Use the provided authorities in the token
|
org.springframework.mock.web.MockHttpServletRequest |
postProcessRequest(org.springframework.mock.web.MockHttpServletRequest request) |
public SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor authorities(java.util.Collection<org.springframework.security.core.GrantedAuthority> authorities)
authorities - the authorities to useSecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor for further configurationpublic SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor authorities(org.springframework.security.core.GrantedAuthority... authorities)
authorities - the authorities to useSecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor for further configurationpublic SecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor authorities(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,java.util.Collection<org.springframework.security.core.GrantedAuthority>> authoritiesConverter)
Jwt so that custom authorities can be derived
from itauthoritiesConverter - the conversion strategy from Jwt to a Collection
of GrantedAuthoritysSecurityMockMvcRequestPostProcessors.JwtRequestPostProcessor for further configurationpublic org.springframework.mock.web.MockHttpServletRequest postProcessRequest(org.springframework.mock.web.MockHttpServletRequest request)
postProcessRequest in interface org.springframework.test.web.servlet.request.RequestPostProcessor