Skip to content

Commit

Permalink
Fix token introspection invalid request reason
Browse files Browse the repository at this point in the history
  • Loading branch information
ransombriggs committed Jul 12, 2024
1 parent d23242f commit d86fc47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ User-visible changes worth mentioning.

Add your entry here.

- [#1715] Fix token introspection invalid request reason
- [#1714] Fix `Doorkeeper::AccessToken.find_or_create_for` with empty scopes which raises NoMethodError
- [#1712] Add `Pragma: no-cache` to token response

Expand Down
3 changes: 1 addition & 2 deletions lib/doorkeeper/oauth/token_introspection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module OAuth
#
# @see https://datatracker.ietf.org/doc/html/rfc7662
class TokenIntrospection
attr_reader :error
attr_reader :error, :invalid_request_reason

def initialize(server, token)
@server = server
Expand Down Expand Up @@ -38,7 +38,6 @@ def to_json(*)
private

attr_reader :server, :token
attr_reader :invalid_request_reason

# If the protected resource uses OAuth 2.0 client credentials to
# authenticate to the introspection endpoint and its credentials are
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/tokens_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@

expect(json_response).to match(
"error" => "invalid_request",
"error_description" => an_instance_of(String),
"error_description" => I18n.t("doorkeeper.errors.messages.invalid_request.request_not_authorized"),
)
end
end
Expand Down

0 comments on commit d86fc47

Please sign in to comment.