first commit

This commit is contained in:
2026-05-06 14:35:49 +09:00
commit 8b3402160f
11 changed files with 824 additions and 0 deletions

26
views/error.ejs Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>Server-Side Demo Error</title>
<style>
body { font-family: sans-serif; padding: 2rem; background-color: #f0f2f5; }
.container { max-width: 800px; margin: 0 auto; background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.error-box { background: #fff1f0; border: 1px solid #ffa39e; padding: 1rem; border-radius: 4px; color: #cf1322; }
pre { background: #f8f9fa; padding: 1rem; border-radius: 4px; overflow-x: auto; margin-top: 1rem; }
.btn { display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 4px; margin-top: 1rem; }
</style>
</head>
<body>
<div class="container">
<h1>인증 오류</h1>
<div class="error-box">
<p><strong>Message:</strong> <%= message %></p>
<p><strong>Detail:</strong> <%= detail %></p>
</div>
<p>자세한 내용은 서버 로그를 확인하세요.</p>
<a href="/" class="btn">홈으로 이동</a>
</div>
</body>
</html>

25
views/index.ejs Normal file
View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Baron SSO Server-Side Demo</title>
<style>
body { font-family: sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; margin: 0; background-color: #f0f2f5; }
.container { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-align: center; }
.btn { display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 4px; margin-top: 1rem; }
.btn:hover { background-color: #0056b3; }
</style>
</head>
<body>
<div class="container">
<h1>Baron SSO Server-Side Demo</h1>
<% if (user) { %>
<p>로그인됨: <strong><%= user.userinfo.name || user.userinfo.sub %></strong></p>
<a href="/profile" class="btn">프로필 보기</a>
<a href="/logout" class="btn" style="background-color: #6c757d;">로그아웃</a>
<% } else { %>
<p>현재 로그인되지 않았습니다.</p>
<a href="/login" class="btn">Baron SSO로 로그인</a>
<% } %>
</div>
</body>
</html>

28
views/profile.ejs Normal file
View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>Server-Side User Profile</title>
<style>
body { font-family: sans-serif; padding: 2rem; background-color: #f0f2f5; }
.container { max-width: 800px; margin: 0 auto; background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
pre { background: #f8f9fa; padding: 1rem; border-radius: 4px; overflow-x: auto; }
.btn { display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 4px; margin-top: 1rem; }
</style>
</head>
<body>
<div class="container">
<h1>Server-Side User Profile</h1>
<p><strong>Sub:</strong> <%= user.userinfo.sub %></p>
<p><strong>Name:</strong> <%= user.userinfo.name || 'N/A' %></p>
<p><strong>Email:</strong> <%= user.userinfo.email || 'N/A' %></p>
<h3>Raw User Info</h3>
<pre><%= JSON.stringify(user.userinfo, null, 2) %></pre>
<h3>Tokens</h3>
<pre><%= JSON.stringify(user.tokenset, null, 2) %></pre>
<a href="/" class="btn">홈으로 이동</a>
</div>
</body>
</html>