Annotation Interface ParameterizedAuthentication
@Target({ANNOTATION_TYPE,PARAMETER})
@Retention(RUNTIME)
@ConvertWith(AuthenticationArgumentProcessor.class)
public @interface ParameterizedAuthentication
Shortcut for @ConvertWith(ParameterizedAuthentication.AuthenticationArgumentProcessor.class), which populates the passed
@ParameterizedTest parameter.
@Autowired
WithJwt.AuthenticationFactory authFactory;
@ParameterizedTest
@MethodSource("authSource")
void givenUserIsPersona_whenGetGreet_thenReturnsGreeting(@ParameterizedAuthentication Authentication auth) {
...
}
Stream<AbstractAuthenticationToken> authSource() {
return authFactory.authenticationsFrom("ch4mp.json", "tonton-pirate.json");
}
- Since:
- 6.1.12
- Author:
- Jerome Wacongne ch4mp@c4-soft.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class