Files
sam-api/app/Swagger/v1/AuthApi.php
2025-08-14 10:30:42 +09:00

83 lines
2.4 KiB
PHP

<?php
namespace App\Swagger\v1;
/**
* @OA\Get(
* path="/api/v1/debug-apikey",
* tags={"API Key 인증"},
* summary="API Key 인증 확인",
* security={
* {"ApiKeyAuth": {}},
* {"BearerAuth": {}}
* },
* @OA\Response(
* response=200,
* description="API Key 인증 성공"
* ),
* @OA\Response(
* response=401,
* description="인증 실패",
* @OA\JsonContent(ref="#/components/schemas/ErrorResponse")
* )
* )
*
* @OA\Post(
* path="/api/v1/login",
* summary="회원 토큰 정보확인",
* tags={"Auth"},
* security={
* {"ApiKeyAuth": {}}
* },
* @OA\RequestBody(
* required=true,
* @OA\JsonContent(
* required={"user_id", "user_pwd"},
* @OA\Property(property="user_id", type="string", example="test"),
* @OA\Property(property="user_pwd", type="string", example="testpass")
* )
* ),
* @OA\Response(
* response=200,
* description="로그인 성공",
* @OA\JsonContent(
* @OA\Property(property="success", type="boolean", example=true),
* @OA\Property(property="message", type="string", example="로그인 성공"),
* @OA\Property(property="data", type="object",
* @OA\Property(property="user_token", type="string", example="abc123xyz")
* )
* )
* ),
* @OA\Response(
* response=401,
* description="로그인 실패",
* @OA\JsonContent(ref="#/components/schemas/ErrorResponse")
* )
* )
*
* @OA\Post(
* path="/api/v1/logout",
* summary="로그아웃 (Access 및 Token 무효화)",
* tags={"Auth"},
* security={
* {"ApiKeyAuth": {}},
* {"BearerAuth": {}}
* },
* @OA\Response(
* response=200,
* description="로그아웃 성공",
* @OA\JsonContent(
* @OA\Property(property="success", type="boolean", example=true),
* @OA\Property(property="message", type="string", example="로그아웃 성공"),
* @OA\Property(property="data", type="null", example=null)
* )
* ),
* @OA\Response(
* response=401,
* description="인증 실패",
* @OA\JsonContent(ref="#/components/schemas/ErrorResponse")
* )
* )
*/
class AuthApi {}