Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Mineru98/263d9e0e20cbadd2da99491c218ec656 to your computer and use it in GitHub Desktop.
Save Mineru98/263d9e0e20cbadd2da99491c218ec656 to your computer and use it in GitHub Desktop.
sequenceDiagram
    autonumber
    participant Client as 클라이언트(브라우저)
    participant API as 백엔드 API 서버
    participant DB as 데이터베이스
    
    rect rgba(255, 200, 200, 0.1)
        Note over Client, DB: 계정 정보 조회 프로세스
        Client->>Client: 마이페이지 - 계정 정보 클릭
        Client->>API: 계정 정보 요청<br>(JWT 토큰)
        
        API->>API: JWT 토큰 검증
        
        alt 토큰 유효
            API->>DB: 사용자 정보 조회<br>(Users 테이블)
            DB-->>API: 사용자 정보 반환<br>(email, name, created_at)
            API-->>Client: 200 OK<br>(사용자 정보)
            Client->>Client: 계정 정보 화면 렌더링
        else 토큰 무효
            API-->>Client: 401 Unauthorized
            Client->>Client: 로그인 페이지로 리다이렉트
        end
    end
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment