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 11, 2024
1 parent 1cd750b commit 376d5ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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 376d5ac

Please sign in to comment.