|
12 | 12 | * limitations under the License. |
13 | 13 | **/ |
14 | 14 | use App\Models\Foundation\Summit\Repositories\ISpeakerOrganizationalRoleRepository; |
| 15 | +use App\Security\SummitScopes; |
15 | 16 | use models\oauth2\IResourceServerContext; |
16 | 17 | use Illuminate\Support\Facades\Log; |
17 | 18 | use models\exceptions\EntityNotFoundException; |
|
20 | 21 | use utils\PagingResponse; |
21 | 22 | use Illuminate\Support\Facades\Request; |
22 | 23 | use OpenApi\Attributes as OA; |
| 24 | + |
| 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 | + |
23 | 44 | /** |
24 | 45 | * Class OAuth2SpeakerOrganizationalRoleApiController |
25 | 46 | * @package App\Http\Controllers |
@@ -47,7 +68,7 @@ public function __construct |
47 | 68 | summary: 'Get all default speaker organizational roles', |
48 | 69 | description: 'Retrieves a list of default organizational roles for speakers. These are predefined role types that speakers can select to describe their position or role within an organization (e.g., "Developer", "Manager", "Architect", "Executive").', |
49 | 70 | operationId: 'getAllSpeakerOrganizationalRoles', |
50 | | - security: [['oauth2_scopes' => [ |
| 71 | + security: [['speaker_organizational_role_oauth2' => [ |
51 | 72 | SummitScopes::ReadSummitData, |
52 | 73 | SummitScopes::ReadAllSummitData |
53 | 74 | ]]], |
|
0 commit comments