Mock Jwt should ensure that CSRF is not required #7170
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
According to #7118, when using
jwt()
(Servlet) ormockJwt()
(WebFlux) test support, a tester must also provide a CSRF token.This is because the CSRF token is lifted when a bearer token header is present in the request.
But, when using
jwt()
ormockJwt()
, no bearer token header is provided as it's unnecessary.In order to align with the expected behavior of resource server endpoints, when
jwt()
ormockJwt()
is used, the tester should not also have to supply a CSRF token.The text was updated successfully, but these errors were encountered: