[Developer] #424 style login page and env admin defaults
This commit is contained in:
@@ -24,6 +24,8 @@ export BACKOFFICE_DB_PASSWORD="${ADB_PASSWORD}"
|
|||||||
# export ADB_CONN="${ADB_USER}/${ADB_PASSWORD}@${ADB_TNS}"
|
# export ADB_CONN="${ADB_USER}/${ADB_PASSWORD}@${ADB_TNS}"
|
||||||
|
|
||||||
# --- (2b) Spring Boot 백오피스 ---
|
# --- (2b) Spring Boot 백오피스 ---
|
||||||
|
export BACKOFFICE_ADMIN_USER="admin"
|
||||||
|
export BACKOFFICE_ADMIN_PASSWORD="admin"
|
||||||
export BACKOFFICE_ORDS_BASE_URL="https://yh0olybn5pqce4n-d8aukro81636mon0.adb.ap-seoul-1.oraclecloudapps.com/ords"
|
export BACKOFFICE_ORDS_BASE_URL="https://yh0olybn5pqce4n-d8aukro81636mon0.adb.ap-seoul-1.oraclecloudapps.com/ords"
|
||||||
export BACKOFFICE_ORDS_TIMEOUT_SECONDS="10"
|
export BACKOFFICE_ORDS_TIMEOUT_SECONDS="10"
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.cloudhandson.vpdbackoffice.config;
|
|||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.security.config.Customizer;
|
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.core.userdetails.User;
|
import org.springframework.security.core.userdetails.User;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
@@ -20,7 +19,9 @@ public class SecurityConfig {
|
|||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/css/**", "/js/**", "/webjars/**").permitAll()
|
.requestMatchers("/css/**", "/js/**", "/webjars/**").permitAll()
|
||||||
.anyRequest().authenticated())
|
.anyRequest().authenticated())
|
||||||
.formLogin(Customizer.withDefaults())
|
.formLogin(login -> login
|
||||||
|
.loginPage("/login")
|
||||||
|
.permitAll())
|
||||||
.logout(logout -> logout.logoutSuccessUrl("/login?logout"))
|
.logout(logout -> logout.logoutSuccessUrl("/login?logout"))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.cloudhandson.vpdbackoffice.web;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class LoginController {
|
||||||
|
|
||||||
|
@GetMapping("/login")
|
||||||
|
public String login() {
|
||||||
|
return "login";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,6 +22,71 @@ body {
|
|||||||
font-family: "Oracle Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
font-family: "Oracle Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-body {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-shell {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 2rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-panel {
|
||||||
|
background: var(--rw-surface);
|
||||||
|
border: 1px solid var(--rw-border);
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: var(--rw-shadow);
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 420px;
|
||||||
|
padding: 1.5rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-brand {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid var(--rw-border);
|
||||||
|
display: flex;
|
||||||
|
gap: .85rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-mark {
|
||||||
|
align-items: center;
|
||||||
|
background: var(--rw-primary);
|
||||||
|
border-radius: 8px;
|
||||||
|
color: #fff;
|
||||||
|
display: inline-flex;
|
||||||
|
font-weight: 800;
|
||||||
|
height: 3rem;
|
||||||
|
justify-content: center;
|
||||||
|
width: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-brand h1 {
|
||||||
|
font-size: 1.35rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-brand p {
|
||||||
|
color: var(--rw-muted);
|
||||||
|
margin: .2rem 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
display: grid;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form label {
|
||||||
|
color: var(--rw-muted);
|
||||||
|
font-size: .875rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.rw-nav,
|
.rw-nav,
|
||||||
.navbar {
|
.navbar {
|
||||||
background: rgba(255, 254, 253, .96) !important;
|
background: rgba(255, 254, 253, .96) !important;
|
||||||
|
|||||||
37
src/main/resources/templates/login.html
Normal file
37
src/main/resources/templates/login.html
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head th:replace="~{fragments/layout :: head('로그인')}"></head>
|
||||||
|
<body class="login-body">
|
||||||
|
<main class="login-shell">
|
||||||
|
<section class="login-panel">
|
||||||
|
<div class="login-brand">
|
||||||
|
<span class="login-mark">VPD</span>
|
||||||
|
<div>
|
||||||
|
<h1>VPD Backoffice</h1>
|
||||||
|
<p>권한, 토큰, ORDS 검증을 관리합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-danger" th:if="${param.error}">
|
||||||
|
계정 또는 비밀번호가 올바르지 않습니다.
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-success" th:if="${param.logout}">
|
||||||
|
로그아웃되었습니다.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form method="post" th:action="@{/login}" class="login-form">
|
||||||
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||||
|
<label>
|
||||||
|
Admin User
|
||||||
|
<input class="form-control" name="username" type="text" autocomplete="username" autofocus required>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Admin Password
|
||||||
|
<input class="form-control" name="password" type="password" autocomplete="current-password" required>
|
||||||
|
</label>
|
||||||
|
<button class="btn rw-btn-primary w-100" type="submit">로그인</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user