Commit Graph

6 Commits

Author SHA1 Message Date
Emelia Smith
77cf2abb3a
Improve /oauth/token request specs
Previously these specs passed incorrect parameters to both the authorization_code
and client_credentials grant flows.

The authorization_code flow does not accept a `scope` parameter, instead the scope
is set when the access grant is created, per RFC 6749 Section 4.1.2. The `code`
parameter is accepted by this flow.

https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2

The client_credentials flow does not accept a `code` parameter, and instead accepts
a `scope` parameter, per RFC 6749 Section 4.4.1

https://www.rfc-editor.org/rfc/rfc6749#section-4.4.1

This ensures we're only testing valid oauth flows, and not deviating from the
specification. The OAuth flows should ignore any unknown parameters (i.e., passing
`code` to client_credentials would have no impact on the functionality, and this
would be asserted at the Doorkeeper level).
2025-04-24 18:13:56 +02:00
Emelia Smith
5a5f1a3718
Change /oauth/token request specs to use client_secret_basic authentication 2025-04-24 18:11:10 +02:00
Matt Jankowski
6463415e06
Update rubocop-rspec to version 3.6.0 (#34497) 2025-04-24 14:56:13 +00:00
Matt Jankowski
8ef546fe6b
Convert oauth/tokens#revoke spec controller->request (#34174) 2025-03-18 08:16:42 +00:00
Matt Jankowski
6b6a80b407
Remove body_as_json in favor of built-in response.parsed_body for JSON response specs (#31749) 2024-09-06 09:58:46 +00:00
David Roetzel
0374918746
Add spec for doorkeeper behavior around issuing tokens (#31545) 2024-08-23 08:20:32 +00:00