Skip to content

Commit 3147c4c

Browse files
chore: Add PR's requested changes
1 parent f5d04d0 commit 3147c4c

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

app/Http/Controllers/OAuth2/OAuth2ProviderController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __construct
9090
new OA\Parameter(name: 'redirect_uri', in: 'query', required: true, description: 'Redirect URI', schema: new OA\Schema(type: 'string', format: 'uri')),
9191
new OA\Parameter(name: 'scope', in: 'query', required: false, description: 'Space-delimited scopes', schema: new OA\Schema(type: 'string')),
9292
new OA\Parameter(name: 'state', in: 'query', required: false, description: 'Opaque state parameter', schema: new OA\Schema(type: 'string')),
93-
new OA\Parameter(name: 'approval_prompt', in: 'query', required: false, description: 'Indicates whether the user should be re-prompted for consent. The default is auto, so a given user should only see the consent page for a given set of scopes the first time through the sequence. If the value is force, then the user sees a consent page even if they previously gave consent to your application for a given set of scopes.', enum: ['auto', 'force'], schema: new OA\Schema(type: 'string', enum: ['auto', 'force'])),
93+
new OA\Parameter(name: 'approval_prompt', in: 'query', required: false, description: 'Indicates whether the user should be re-prompted for consent. The default is auto, so a given user should only see the consent page for a given set of scopes the first time through the sequence. If the value is force, then the user sees a consent page even if they previously gave consent to your application for a given set of scopes.', schema: new OA\Schema(type: 'string', enum: ['auto', 'force'])),
9494
new OA\Parameter(name: 'access_type', in: 'query', required: false, description: 'Indicates whether your application needs to access an API when the user is not present at the browser. This parameter defaults to online. If your application needs to refresh access tokens when the user is not present at the browser, then use offline. This will result in your application obtaining a refresh token the first time your application exchanges an authorization code for a user.', schema: new OA\Schema(type: 'string', enum: ['online', 'offline'])),
9595
new OA\Parameter(name: 'response_mode', in: 'query', required: false, description: 'OPTIONAL. Informs the Authorization Server of the mechanism to be used for returning Authorization Response parameters from the Authorization Endpoint. This use of this parameter is NOT RECOMMENDED with a value that specifies the same Response Mode as the default Response Mode for the Response Type used.\nThe default Response Mode for the OAuth 2.0 code Response Type is the query encoding. For purposes of this specification, the default Response Mode for the OAuth 2.0 token Response Type is the fragment encoding.', schema: new OA\Schema(type: 'string', enum: ['query', 'fragment', 'form_post', 'direct'])),
9696
new OA\Parameter(name: 'code_challenge', in: 'query', required: false, description: 'PKCE code challenge', schema: new OA\Schema(type: 'string')),
@@ -250,6 +250,7 @@ public function auth()
250250
summary: 'OAuth2 Token Endpoint',
251251
description: 'Issues access tokens. Supports authorization_code, client_credentials, password, refresh_token, and passwordless grant types.',
252252
tags: ['OAuth2 / OpenID Connect'],
253+
security: [['OAuth2ProviderClientBasic' => []], ['OAuth2ProviderSecurity' => []]],
253254
requestBody: new OA\RequestBody(
254255
description: 'Token request parameters',
255256
required: true,

app/Swagger/OAuth2ProviderControllerSchemas.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
title: 'OAuth2 Token Response',
1010
description: 'Successful token response per RFC 6749 §5.1',
1111
type: 'object',
12+
required: ['access_token', 'token_type'],
1213
properties: [
1314
new OA\Property(property: 'access_token', type: 'string', description: 'The access token issued by the authorization server'),
1415
new OA\Property(property: 'token_type', type: 'string', description: 'The type of the token (typically Bearer)', example: 'Bearer'),
@@ -42,6 +43,7 @@ class OAuth2ErrorResponseSchema
4243
title: 'OAuth2 Token Introspection Response',
4344
description: 'Token introspection response per RFC 7662',
4445
type: 'object',
46+
required: ['active'],
4547
properties: [
4648
new OA\Property(property: 'active', type: 'boolean', description: 'Whether the token is active'),
4749
new OA\Property(property: 'access_token', type: 'string', description: 'The access token value'),
@@ -87,6 +89,7 @@ class OAuth2IntrospectionResponseSchema
8789
title: 'JSON Web Key Set',
8890
description: 'JWK Set document per RFC 7517',
8991
type: 'object',
92+
required: ['keys'],
9093
properties: [
9194
new OA\Property(
9295
property: 'keys',
@@ -115,6 +118,7 @@ class JWKSResponseSchema
115118
title: 'OpenID Connect Discovery Document',
116119
description: 'OpenID Provider Configuration per OpenID Connect Discovery 1.0',
117120
type: 'object',
121+
required: ['issuer', 'authorization_endpoint', 'token_endpoint', 'jwks_uri', 'response_types_supported', 'subject_types_supported', 'id_token_signing_alg_values_supported'],
118122
properties: [
119123
new OA\Property(property: 'issuer', type: 'string', format: 'uri', description: 'Issuer identifier URL'),
120124
new OA\Property(property: 'authorization_endpoint', type: 'string', format: 'uri', description: 'Authorization endpoint URL'),

app/Swagger/Requests/OAuth2AuthorizationRequestSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
new OA\Property(property: 'scope', type: 'string', description: 'Space-delimited scopes'),
1818
new OA\Property(property: 'state', type: 'string', description: 'Opaque state parameter'),
1919
new OA\Property(property: 'approval_prompt', type: 'string', description: 'Indicates whether the user should be re-prompted for consent. The default is auto, so a given user should only see the consent page for a given set of scopes the first time through the sequence. If the value is force, then the user sees a consent page even if they previously gave consent to your application for a given set of scopes.', enum: ['auto', 'force']),
20-
new OA\Property(property: 'access_type', type: 'string', description: 'Indicates whether your application needs to access an API when the user is not present at the browser. This parameter defaults to online. If your application needs to refresh access tokens when the user is not present at the browser, then use offline. This will result in your application obtaining a refresh token the first time your application exchanges an authorization code for a user.'),
20+
new OA\Property(property: 'access_type', type: 'string', description: 'Indicates whether your application needs to access an API when the user is not present at the browser. This parameter defaults to online. If your application needs to refresh access tokens when the user is not present at the browser, then use offline. This will result in your application obtaining a refresh token the first time your application exchanges an authorization code for a user.', enum: ['online', 'offline']),
2121
new OA\Property(property: 'response_mode', type: 'string', description: 'OPTIONAL. Informs the Authorization Server of the mechanism to be used for returning Authorization Response parameters from the Authorization Endpoint. This use of this parameter is NOT RECOMMENDED with a value that specifies the same Response Mode as the default Response Mode for the Response Type used.\nThe default Response Mode for the OAuth 2.0 code Response Type is the query encoding. For purposes of this specification, the default Response Mode for the OAuth 2.0 token Response Type is the fragment encoding.', enum: ['query', 'fragment', 'form_post', 'direct']),
2222
new OA\Property(property: 'code_challenge', type: 'string', description: 'PKCE code challenge'),
2323
new OA\Property(property: 'code_challenge_method', type: 'string', description: 'Optional. PKCE challenge method', enum: ['plain', 'S256']),

0 commit comments

Comments
 (0)