Skip to content
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0b9253b
feat(oauth2): simple userinfo endpoint
hardviper Feb 20, 2024
bbbfe42
feat(oauth2): fix check null value, added more user_info field
hardviper Feb 21, 2024
21a1825
feat(oauth2): fix lint
hardviper Feb 21, 2024
fb8b061
feat(oauth2): fix deprecated method
hardviper Feb 22, 2024
4a645fc
Update apps/oauth2/lib/Controller/OauthApiController.php
hardviper Feb 26, 2024
fecc3ef
Update apps/oauth2/lib/Controller/OauthApiController.php
hardviper Feb 26, 2024
a54d0cd
Update apps/oauth2/lib/Controller/OauthApiController.php
hardviper Feb 26, 2024
c6efbee
feat(oauth2): user not found exception
hardviper Feb 26, 2024
3407a92
feat(oauth2): replace getAvatar with a named route
hardviper Feb 26, 2024
6405b27
feat(oauth2): parted name for ru locale
hardviper Feb 26, 2024
d6e0ddf
feat(oauth2): fix avatar absolute url
hardviper Feb 26, 2024
1ee8a1a
feat(oauth2): fix early return
hardviper Feb 28, 2024
81a92b8
Merge branch 'master' into feat/oauth2/userinfo
hardviper Mar 11, 2024
03cf5d9
feat(oauth2): separation name feature config
hardviper Mar 11, 2024
1e264ac
feat(oauth2): optional separate name
hardviper Mar 11, 2024
bf42920
feat(oauth2): add unit-test for GetUserInfo
hardviper Mar 13, 2024
b6f6651
feat(oauth2): add unit-test for GetUserInfo separate mode
hardviper Mar 13, 2024
a424e96
Update apps/oauth2/lib/Controller/OauthApiController.php
hardviper Mar 13, 2024
1c1fa9e
Update apps/oauth2/lib/Controller/OauthApiController.php
hardviper Mar 13, 2024
dd9edb8
Update apps/oauth2/tests/Controller/OauthApiControllerTest.php
hardviper Mar 13, 2024
16edc40
Update apps/oauth2/tests/Controller/OauthApiControllerTest.php
hardviper Mar 13, 2024
b077248
Update config/config.sample.php
hardviper Mar 13, 2024
540eb16
feat(oauth2): fix var name
hardviper Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(oauth2): user not found exception
Signed-off-by: d.kudrinskiy <[email protected]>
  • Loading branch information
hardviper committed Feb 26, 2024
commit c6efbeebaf538d2046b263b95a81971ddaa06eff
5 changes: 1 addition & 4 deletions apps/oauth2/lib/Controller/OauthApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ public function getUserInfo(): JSONResponse {
return new JSONResponse([
'error' => 'user_not_found',
], Http::STATUS_NOT_FOUND);
} else {
$displayName = $user->getDisplayName();
$partedName = explode(' ', $displayName);
$userId = $user->getUID();
Expand All @@ -254,10 +255,6 @@ public function getUserInfo(): JSONResponse {
'email' => $user->getEMailAddress(),
'picture' => $this->urlGenerator->getAbsoluteURL("index.php/avatar/$userId/512"),
]);
} else {
$response = new JSONResponse([
'error' => 'user_not_found',
], Http::STATUS_NOT_FOUND);
}
return $response;
}
Expand Down