Skip to content

Add Bearer Token Test Support #7528

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

Open
jzheaux opened this issue Oct 14, 2019 · 0 comments
Open

Add Bearer Token Test Support #7528

jzheaux opened this issue Oct 14, 2019 · 0 comments
Labels
in: test An issue in spring-security-test type: enhancement A general enhancement

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Oct 14, 2019

Related to #6634

Testing authentication flows that include a JWT is straight-forward:

this.mvc.perform(get("/")
    .with(jwt(jwt -> jwt.subject("subject"))));

It'd be nice to have Resource Server support that doesn't care about the format"

this.mvc.perform(get("/")
    .with(bearer(b -> b.subject("subject"))));

While the first produces a JwtAuthenticationToken and Jwt principal, the second would produce a BearerTokenAuthentication and a OAuth2AuthenticatedPrincipal principal.

@jzheaux jzheaux added in: test An issue in spring-security-test type: enhancement A general enhancement labels Oct 14, 2019
@jzheaux jzheaux added this to the 5.3.x milestone Oct 14, 2019
@jzheaux jzheaux self-assigned this Oct 14, 2019
@jzheaux jzheaux removed their assignment Apr 14, 2020
@rwinch rwinch removed this from the 5.3.x milestone May 31, 2022
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