Skip to content

Commit

Permalink
Merge branch 'next-38794/deprecate-authorize-endpoint' into 'trunk'
Browse files Browse the repository at this point in the history
NEXT-38794 - Deprecate /api/oauth/authorize route in AuthController

See merge request shopware/6/product/platform!14993
  • Loading branch information
DennisGarding committed Oct 15, 2024
2 parents fb178de + a1eca83 commit d321dd9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions changelog/_unreleased/2024-10-10-deprecate-auth-endpoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Deprecate unused auth endpoint
issue: NEXT-38794
---
# API
* Deprecated `\Core\Framework\Api\Controller\AuthController::authorize` method (API route `/api/oauth/authorize`). It will be removed without replacement with the next major version.

___
# Next Major Version Changes
* Removed `\Core\Framework\Api\Controller\AuthController::authorize` method (API route `/api/oauth/authorize`) without replacement.
5 changes: 5 additions & 0 deletions src/Core/Framework/Api/Controller/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use League\OAuth2\Server\AuthorizationServer;
use Shopware\Core\Framework\Api\Controller\Exception\AuthThrottledException;
use Shopware\Core\Framework\Feature;
use Shopware\Core\Framework\Log\Package;
use Shopware\Core\Framework\RateLimiter\Exception\RateLimitExceededException;
use Shopware\Core\Framework\RateLimiter\RateLimiter;
Expand All @@ -28,9 +29,13 @@ public function __construct(
) {
}

/**
* @deprecated tag:v6.7.0 - Remove endpoint "/api/oauth/authorize"
*/
#[Route(path: '/api/oauth/authorize', name: 'api.oauth.authorize', defaults: ['auth_required' => false], methods: ['POST'])]
public function authorize(Request $request): void
{
Feature::triggerDeprecationOrThrow('v6.7.0.0', Feature::deprecatedMethodMessage(__CLASS__, __METHOD__, 'v6.7.0.0'));
}

#[Route(path: '/api/oauth/token', name: 'api.oauth.token', defaults: ['auth_required' => false], methods: ['POST'])]
Expand Down

0 comments on commit d321dd9

Please sign in to comment.