Skip to content

Align JWT Testing Documentation #10028

@jzheaux

Description

@jzheaux

The SecurityMockMvcRequestPostProcessors and SecurityMockServerConfigurers references contain a section for each OAuth 2.0-based request post processor or mock server configurer.

Most of them were written at the same time and so read about the same way; however, the "Testing JWT Authentication" sections read quite differently from the rest.

So that all the sections read similarly, we should update the "Testing JWT Authentication" (servlet) and "Testing JWT Authentication" (webflux) sections.

The changes should at least include:

  • The section titles should be changed from "Testing JWT Authentication" to "Testing OAuth 2.0 Resource Servers with JWT".
  • The initial paragraphs should show an example of when SecurityMockMvcRequestPostProcessors#jwt() and SecurityMockServerConfigurers#mockJwt() are necessary, respectively. For example, the documentation implies that it should be used whenever an application is configured as a resource server - it should be clearer that it's when an application's controllers need the principal to be a Jwt.

In the end, these two sections should read the same as their OAuth 2.0 counterparts like "Testing OIDC Login" (servlet), "Testing OAuth 2.0 Login" (servlet), "Testing OAuth 2.0 Clients" (webflux), and "Testing Opaque Token Authentication" (webflux).

To preserve links, all the anchors should remain as-is.

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplesstatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions