Skip to content

Improve OAuth2 Resource Server tests #7118

Closed
@henriquels25

Description

@henriquels25

Summary

The tests for the OAuth2 Resource Server sample only include GET requests.

I believe it would be useful to add examples for other HTTP methods (POST, PUT, PATCH, DELETE) because the code for testing them is different.

Sample

In this project it's possible to see that if the same technique used for testing the GET requests is used for a POST, the test fails without sending the CSRF token in the request.

In this example, I created a working POST request test example based on the sample, based on the explanation contained on this StackOverflow question.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions