Skip to content

Commit 4b1b797

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

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

app/Http/Controllers/OAuth2/OAuth2ProviderController.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,16 @@ public function certs()
424424
new OA\Response(response: HttpResponse::HTTP_OK, description: 'OpenID Connect Discovery document', content: new OA\JsonContent(ref: '#/components/schemas/OpenIDDiscoveryResponse')),
425425
]
426426
)]
427+
#[OA\Get(
428+
path: '/oauth2/.well-known/openid-configuration',
429+
operationId: 'oauth2DiscoveryAlias',
430+
summary: 'OpenID Connect Discovery Endpoint (oauth2-prefixed alias)',
431+
description: 'Alias for /.well-known/openid-configuration. Returns the OpenID Provider Configuration document per OpenID Connect Discovery 1.0.',
432+
tags: ['OAuth2 / OpenID Connect'],
433+
responses: [
434+
new OA\Response(response: HttpResponse::HTTP_OK, description: 'OpenID Connect Discovery document', content: new OA\JsonContent(ref: '#/components/schemas/OpenIDDiscoveryResponse')),
435+
]
436+
)]
427437
public function discovery()
428438
{
429439

@@ -437,6 +447,16 @@ public function discovery()
437447
/**
438448
* @see http://openid.net/specs/openid-connect-session-1_0.html#OPiframe
439449
*/
450+
#[OA\Get(
451+
path: '/oauth2/check-session',
452+
operationId: 'oauth2CheckSession',
453+
summary: 'OpenID Connect Check Session iFrame',
454+
description: 'Returns the HTML iFrame page used by clients for OIDC Session Management (OpenID Connect Session Management 1.0 §3). The URL is advertised as check_session_iframe in the discovery document.',
455+
tags: ['OAuth2 / OpenID Connect'],
456+
responses: [
457+
new OA\Response(response: HttpResponse::HTTP_OK, description: 'Session check iFrame HTML page', content: new OA\MediaType(mediaType: 'text/html')),
458+
]
459+
)]
440460
public function checkSessionIFrame()
441461
{
442462
$data = [];

app/Swagger/Requests/OAuth2TokenRequestSchema.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@
1111
type: 'object',
1212
required: ['grant_type'],
1313
properties: [
14-
new OA\Property(property: 'grant_type', type: 'string', description: 'OAuth2 grant type', enum: ['authorization_code', 'client_credentials', 'password', 'refresh_token', 'passwordless']),
14+
new OA\Property(property: 'grant_type', type: 'string', description: 'OAuth2 grant type', enum: ['authorization_code', 'client_credentials', 'implicit', 'refresh_token', 'passwordless', 'hybrid']),
1515
new OA\Property(property: 'code', type: 'string', description: 'Authorization code (authorization_code grant)'),
16+
new OA\Property(property: 'code_verifier', type: 'string', description: 'PKCE code verifier (authorization_code grant with PKCE)'),
1617
new OA\Property(property: 'redirect_uri', type: 'string', format: 'uri', description: 'Redirect URI (must match the one used in authorization request)'),
1718
new OA\Property(property: 'client_id', type: 'string', description: 'Client identifier (if not using HTTP Basic auth)'),
1819
new OA\Property(property: 'client_secret', type: 'string', description: 'Client secret (if not using HTTP Basic auth)'),
1920
new OA\Property(property: 'refresh_token', type: 'string', description: 'Refresh token (refresh_token grant)'),
2021
new OA\Property(property: 'scope', type: 'string', description: 'Space-delimited scopes'),
21-
new OA\Property(property: 'username', type: 'string', description: 'Username (password grant)'),
22-
new OA\Property(property: 'password', type: 'string', description: 'Password (password grant)'),
2322
new OA\Property(property: 'audience', type: 'string', description: 'Target audience (client_credentials grant)'),
2423
new OA\Property(property: 'connection', type: 'string', description: 'Connection type (passwordless grant)', enum: ['sms', 'email']),
25-
new OA\Property(property: 'send', type: 'string', description: 'Delivery method (passwordless grant)', enum: ['code', 'link']),
26-
new OA\Property(property: 'email', type: 'string', description: 'Email address (passwordless grant)'),
27-
new OA\Property(property: 'phone_number', type: 'string', description: 'Phone number (passwordless grant)'),
24+
new OA\Property(property: 'otp', type: 'string', description: 'One-time password code (passwordless grant)'),
25+
new OA\Property(property: 'email', type: 'string', description: 'Email address (passwordless grant, connection=email)'),
26+
new OA\Property(property: 'phone_number', type: 'string', description: 'Phone number (passwordless grant, connection=sms)'),
2827
]
2928
)]
3029
class OAuth2TokenRequestSchema
3130
{
32-
}
31+
}

0 commit comments

Comments
 (0)