feat: implement Presentation layer for User Logout / ユーザーログアウトのPresentation層実装#538
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/user-logout #538 +/- ##
======================================================
+ Coverage 61.92% 62.21% +0.28%
- Complexity 1594 1604 +10
======================================================
Files 134 135 +1
Lines 8190 8252 +62
======================================================
+ Hits 5072 5134 +62
Misses 3118 3118
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / 目的
Implement the Presentation layer for
POST /api/v1/user/logoutto complete the User Logout API.ユーザーログアウトAPI(
POST /api/v1/user/logout)のPresentation層を実装し、ログアウト機能を完成させました。What I have done / 実施内容
AuthController:logoutアクションを追加$request->bearerToken()で現在のトークンを取得しLogoutUseCase::handle()に渡すauth:sanctumミドルウェアが処理)Log::error)routes/api.php:POST /v1/user/logoutをauth:sanctumミドルウェア付きで登録Route::controller(AuthController::class)->prefix('user')にまとめて整理Test Results / テスト結果
LogoutTest::test_logout_returns_200_when_authenticatedLogoutTest::test_logout_returns_401_when_unauthenticatedLogoutTest::test_logout_returns_500_on_unexpected_errorCloses #411