Skip to content

Commit b01de04

Browse files
committed
chore: Move the security schema for the controller to its own file
1 parent 6c97f6b commit b01de04

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

app/Http/Controllers/Apis/Protected/Summit/OAuth2SpeakerOrganizationalRoleApiController.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,6 @@
2222
use Illuminate\Support\Facades\Request;
2323
use OpenApi\Attributes as OA;
2424

25-
26-
#[OA\SecurityScheme(
27-
type: 'oauth2',
28-
securityScheme: 'speaker_organizational_role_oauth2',
29-
flows: [
30-
new OA\Flow(
31-
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
32-
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
33-
flow: 'authorizationCode',
34-
scopes: [
35-
SummitScopes::ReadAllSummitData => 'Read All Summit Data',
36-
SummitScopes::ReadSummitData => 'Read Summit Data',
37-
],
38-
),
39-
],
40-
)
41-
]
42-
class SpeakerOrganizationalRoleAuthSchema{}
43-
4425
/**
4526
* Class OAuth2SpeakerOrganizationalRoleApiController
4627
* @package App\Http\Controllers
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use App\Security\SummitScopes;
6+
use OpenApi\Attributes as OA;
7+
8+
9+
#[OA\SecurityScheme(
10+
type: 'oauth2',
11+
securityScheme: 'speaker_organizational_role_oauth2',
12+
flows: [
13+
new OA\Flow(
14+
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
15+
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
16+
flow: 'authorizationCode',
17+
scopes: [
18+
SummitScopes::ReadAllSummitData => 'Read All Summit Data',
19+
SummitScopes::ReadSummitData => 'Read Summit Data',
20+
],
21+
),
22+
],
23+
)
24+
]
25+
class SpeakerOrganizationalRoleAuthSchema{}

0 commit comments

Comments
 (0)