- V2WebView 컴포넌트: iframe 기반 외부 웹 임베딩 - SSO 연동: 현재 로그인 JWT를 sso_token 파라미터로 자동 전달 - /api/system/raw-token: 범용 JWT 토큰 조회 API - V2WebViewConfigPanel: URL, SSO, sandbox 등 설정 UI + 개발자 가이드 Made-with: Cursor
19 lines
556 B
TypeScript
19 lines
556 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { cookies } from "next/headers";
|
|
|
|
export async function GET() {
|
|
try {
|
|
const cookieStore = await cookies();
|
|
const token =
|
|
cookieStore.get("authToken")?.value || cookieStore.get("session_token")?.value || cookieStore.get("token")?.value;
|
|
|
|
if (!token) {
|
|
return NextResponse.json({ error: "로그인이 필요합니다." }, { status: 401 });
|
|
}
|
|
|
|
return NextResponse.json({ token });
|
|
} catch {
|
|
return NextResponse.json({ error: "서버 오류" }, { status: 500 });
|
|
}
|
|
}
|