Annotation Interface WithMockJwtAuth
@Target({METHOD,TYPE})
@Retention(RUNTIME)
@Inherited
@Documented
@WithSecurityContext(factory=JwtAuthenticationTokenFactory.class)
public @interface WithMockJwtAuth
Deprecated.
not as convenient in @Parameterized tests as alternatives listed above and provide with less reliable consistency between claims and
authorities
Annotation to setup test
SecurityContext with an JwtAuthenticationToken. Sample usage:
@Test
@WithMockJwtAuth(@OpenIdClaims(sub = "42"))
public void test() {
...
}
- Author:
- Jérôme Wacongne <ch4mp@c4-soft.com>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDeprecated. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDeprecated.Deprecated.org.springframework.security.test.context.support.TestExecutionEventDeprecated.Deprecated.Deprecated.
-
Element Details
-
value
Deprecated.- Default:
- @com.c4_soft.springaddons.security.oauth2.test.annotations.OpenIdClaims
-
claims
Deprecated.- Default:
- @com.c4_soft.springaddons.security.oauth2.test.annotations.OpenIdClaims
-
tokenString
String tokenStringDeprecated.- Default:
- "machin.truc.chose"
-
headers
Claims headersDeprecated.- Default:
- @com.c4_soft.springaddons.security.oauth2.test.annotations.Claims(stringClaims={@com.c4_soft.springaddons.security.oauth2.test.annotations.StringClaim(name="alg", value="none")})
-
setupBefore
@AliasFor(annotation=org.springframework.security.test.context.support.WithSecurityContext.class) org.springframework.security.test.context.support.TestExecutionEvent setupBeforeDeprecated.- Default:
- TEST_METHOD
-