Assert usage of client credentials for account registration (#34828)

This commit is contained in:
Emelia Smith authored and GitHub committed 2025-05-28 12:09:32 +00:00
1 parent 6ffa262546
commit a73ade526a
4 files changed
+28 -1

No files matched your search

+4
View File
@@ -50,6 +50,10 @@ class Api::BaseController < ApplicationController
nil
end
def require_client_credentials!
render json: { error: 'This method requires an client credentials authentication' }, status: 403 if doorkeeper_token.resource_owner_id.present?
end
def require_authenticated_user!
render json: { error: 'This method requires an authenticated user' }, status: 401 unless current_user
end