Skip to content

Commit f3cab4a

Browse files
chore: change security schema flow to use constants
1 parent d35d774 commit f3cab4a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

app/Swagger/Security/UsersOAuth2Schema.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77

88
#[
99
OA\SecurityScheme(
10-
type: 'oauth2',
11-
securityScheme: 'user_oauth2',
12-
flows: [
13-
new OA\Flow(
14-
flow: 'authorizationCode',
15-
authorizationUrl: '/oauth2/auth',
16-
tokenUrl: '/oauth2/token',
17-
scopes: [
18-
IUserScopes::Profile => 'Read User Profile',
19-
IUserScopes::Email => 'Read User Email',
20-
IUserScopes::Address => 'Read User Address',
21-
IUserScopes::ReadAll => 'Read All Users Data',
22-
IUserScopes::MeWrite => 'Write Current User Data',
23-
IUserScopes::Write => 'Write Users Data',
24-
IUserScopes::UserGroupWrite => 'Write User Group Assignments',
25-
],
26-
),
27-
],
28-
)
10+
type: 'oauth2',
11+
securityScheme: 'user_oauth2',
12+
flows: [
13+
new OA\Flow(
14+
flow: 'authorizationCode',
15+
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
16+
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
17+
scopes: [
18+
IUserScopes::Profile => 'Read User Profile',
19+
IUserScopes::Email => 'Read User Email',
20+
IUserScopes::Address => 'Read User Address',
21+
IUserScopes::ReadAll => 'Read All Users Data',
22+
IUserScopes::MeWrite => 'Write Current User Data',
23+
IUserScopes::Write => 'Write Users Data',
24+
IUserScopes::UserGroupWrite => 'Write User Group Assignments',
25+
],
26+
),
27+
],
28+
)
2929
]
3030
class UsersOAuth2Schema
3131
{
32-
}
32+
}

0 commit comments

Comments
 (0)