-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: testAn issue in spring-security-testAn issue in spring-security-testtype: enhancementA general enhancementA general enhancement
Milestone
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.
Metadata
Metadata
Assignees
Labels
in: testAn issue in spring-security-testAn issue in spring-security-testtype: enhancementA general enhancementA general enhancement