Skip to content

feat: implement Presentation layer for User Login / ユーザーログインのPresentation層実装 #528

Description

@zigzagdev

Parent Issue / 親Issue

#405

Motivation / 目的

Implement the Presentation layer for the User Login API.

ユーザーログインAPIのPresentation層を実装します。

What to do / 実施内容

  • LoginRequest.php: フォームリクエスト(email・password のバリデーション)
  • AuthController.php: LoginUseCase を呼び出してレスポンスを返す
    • 200: 認証成功(token を含む)
    • 401: 認証失敗(InvalidCredentialsException
    • 500: その他エラー(Log::error
  • AuthResource.php: レスポンスの整形
  • Route: POST /api/v1/user/login

Tests / テスト

  • test_login_returns_200_with_token_when_credentials_are_valid
  • test_login_returns_401_when_credentials_are_invalid
  • test_login_returns_422_when_request_is_invalid

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions