Closed
Description
Related to #6634.
It'd be handy to have test support for oidcLogin
:
this.mvc.perform(get("/").with(oidcLogin()));
or
this.mvc.perform(get("/")
.with(oidcLogin().authorities(new SimpleGrantedAuthority("SCOPE_read")));
The result would be an OAuth2AuthenticationToken
as well as an OAuth2AuthorizedClient
.
Ideally, tests would work with controllers using @AuthenticatedPrincipal
as well as @RegisteredOAuth2AuthorizedClient
annotations.