Skip to content

Commit d0bc232

Browse files
chore: Add PR's requested changes on Security concerns
1 parent 0bbba2e commit d0bc232

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

app/Http/Controllers/OAuth2/OAuth2ProviderController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function token()
305305
summary: 'OAuth2 Token Revocation Endpoint',
306306
description: 'Revokes an access token or refresh token per RFC 7009. The endpoint is idempotent — revoking a non-existent token returns success.',
307307
tags: ['OAuth2 / OpenID Connect'],
308-
security: [['OAuth2ProviderSecurity' => []]],
308+
security: [['OAuth2ProviderClientBasic' => []], ['OAuth2ProviderSecurity' => []]],
309309
requestBody: new OA\RequestBody(
310310
description: 'Token revocation parameters',
311311
required: true,
@@ -355,7 +355,7 @@ public function revoke()
355355
summary: 'OAuth2 Token Introspection Endpoint',
356356
description: 'Validates and returns metadata about an access token per RFC 7662. Returns detailed information about the token including associated user data.',
357357
tags: ['OAuth2 / OpenID Connect'],
358-
security: [['OAuth2ProviderSecurity' => []]],
358+
security: [['OAuth2ProviderClientBasic' => []], ['OAuth2ProviderSecurity' => []]],
359359
requestBody: new OA\RequestBody(
360360
description: 'Token introspection parameters',
361361
required: true,

app/Swagger/Security/OAuth2ProviderControllerSecuritySchema.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
),
1717
]
1818
)]
19+
#[OA\SecurityScheme(
20+
securityScheme: 'OAuth2ProviderClientBasic',
21+
type: 'http',
22+
scheme: 'basic',
23+
description: 'HTTP Basic authentication with OAuth2 client_id:client_secret (RFC 6749 §2.3.1).'
24+
)]
1925
class OAuth2ProviderControllerSecuritySchema
2026
{
2127
}

0 commit comments

Comments
 (0)