Skip to content

Add oidcLogin MockMvc Test Support #7618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jzheaux opened this issue Nov 4, 2019 · 0 comments
Closed

Add oidcLogin MockMvc Test Support #7618

jzheaux opened this issue Nov 4, 2019 · 0 comments
Assignees
Labels
in: test An issue in spring-security-test type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Nov 4, 2019

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.

@jzheaux jzheaux added in: test An issue in spring-security-test type: enhancement A general enhancement labels Nov 4, 2019
@jzheaux jzheaux added this to the 5.3.x milestone Nov 4, 2019
@jzheaux jzheaux self-assigned this Nov 4, 2019
jzheaux added a commit to jzheaux/spring-security that referenced this issue Nov 26, 2019
jzheaux added a commit to jzheaux/spring-security that referenced this issue Nov 26, 2019
jzheaux added a commit that referenced this issue Nov 26, 2019
@jgrandja jgrandja modified the milestones: 5.3.x, 5.3.0.M1 Nov 28, 2019
jzheaux added a commit that referenced this issue Dec 3, 2019
Remove documentation requiring a valid ClientRegistrationRepository

Issue: gh-7618
jzheaux added a commit to jzheaux/spring-security that referenced this issue Mar 3, 2020
Make all sub claims 'user' and all scopes 'read' to align with
existing support for JWT

Issue spring-projectsgh-7828
Issue spring-projectsgh-7789
Issue spring-projectsgh-7680
Issue spring-projectsgh-7618
jzheaux added a commit that referenced this issue Mar 3, 2020
Make all sub claims 'user' and all scopes 'read' to align with
existing support for JWT

Issue gh-7828
Issue gh-7789
Issue gh-7680
Issue gh-7618
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test An issue in spring-security-test type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants