46 changed files with 485 additions and 44 deletions
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" |
|||
version="3.1"> |
|||
|
|||
</web-app> |
|||
@ -0,0 +1,103 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title th:utext="#{application.title}"></title> |
|||
<link rel="icon" th:href="@{/favicon.svg}"> |
|||
<meta http-equiv="Content-Type" content="text/html charset=UTF-8"/> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/> |
|||
|
|||
<link rel="stylesheet" type="text/css" th:href="@{/bootstrap/css/bootstrap.min.css}"/> |
|||
<style> |
|||
body{ |
|||
height: 100vh; |
|||
background-color: #EEE; |
|||
background-size: 100% 100%; |
|||
} |
|||
.text-primary { |
|||
color: #14234a !important; |
|||
} |
|||
.bg-primary { |
|||
background-color: #14234a !important; |
|||
} |
|||
.nav-pills .nav-link.active { |
|||
background-color: #14234a; |
|||
} |
|||
.btn-primary { |
|||
background-color: #14234a; |
|||
border-color: #14234a; |
|||
} |
|||
.form-check-input:checked { |
|||
background-color: #14234a; |
|||
border-color: #14234a; |
|||
} |
|||
.btn-outline-primary { |
|||
--bs-btn-color: #14234a; |
|||
--bs-btn-border-color: #14234a; |
|||
--bs-btn-hover-color: #fff; |
|||
--bs-btn-hover-bg: #14234a; |
|||
--bs-btn-hover-border-color: #14234a; |
|||
--bs-btn-focus-shadow-rgb: 13, 110, 253; |
|||
--bs-btn-active-color: #fff; |
|||
--bs-btn-active-bg: #14234a; |
|||
--bs-btn-active-border-color: #14234a; |
|||
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); |
|||
--bs-btn-disabled-color: #14234a; |
|||
--bs-btn-disabled-bg: transparent; |
|||
--bs-btn-disabled-border-color: #14234a; |
|||
--bs-gradient: none; |
|||
} |
|||
.progress-bar { |
|||
background-color: #14234a; |
|||
} |
|||
</style> |
|||
<script type="text/javascript" th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script> |
|||
<script th:inline="javascript"> |
|||
|
|||
</script> |
|||
</head> |
|||
<body style="min-height: 782px; min-width: 600px; background-image: url(login-bg.jpg); background-position: center center; background-repeat: no-repeat; background-size: cover; background-attachment: fixed;"> |
|||
<nav class="navbar bg-primary" th:style="|padding:0px;height:${theme.topper.height}px|"> |
|||
<div class="container-fluid" th:style="|padding:0px;padding-left:8px;height:${theme.topper.height}px|"> |
|||
<a class="navbar-brand" href="#" th:style="|height:${theme.topper.height}px;color:white;padding:0px|"> |
|||
<img th:src="@{|/${theme.topper.logo}?t=${#dates.createNow().getTime()}|}" alt="Logo" th:width="|${theme.topper.logoWidth}px|" th:height="|${theme.topper.logoHeight}px|" style="pading:0px;margin-top:-6px;"> |
|||
<span th:style="|font-size:1.2em;height:${theme.topper.height}px;line-height:${theme.topper.height}px;color:white;|" th:text="#{application.title}"></span> |
|||
</a> |
|||
</div> |
|||
</nav> |
|||
|
|||
<div style="height:100px"></div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-md-6 col-xl-7"></div> |
|||
<div class="col-md-6 col-xl-5"> |
|||
<div class="shadow-sm p-3 mb-5 bg-light rounded-3 border"> |
|||
<div th:if="${error}" class="alert alert-danger" role="alert"> |
|||
<span th:text="#{security.login.message.error}">认证失败!</span> |
|||
</div> |
|||
<form class="row g-3" th:action="@{${loginProcessingUrl}}" method="post"> |
|||
<div class="col-12"> |
|||
<label for="username" class="form-label" th:text="#{loginName}">用户名</label> |
|||
<input type="text" class="form-control" name="username" th:placeholder="#{security.login.username.placeholder}" autofocus> |
|||
</div> |
|||
<div class="col-12"> |
|||
<label for="password" class="form-label" th:text="#{password}">密码</label> |
|||
<input type="password" class="form-control" name="password" th:placeholder="#{security.login.password.placeholder}"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="text-end"> |
|||
<button type="submit" class="ms-2 btn btn-primary" th:text="#{login}">登录</button> |
|||
<button type="reset" class="ms-2 btn btn-success" th:text="#{reset}">重置</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
<script type="text/javascript"> |
|||
|
|||
</script> |
|||
</html> |
|||
@ -0,0 +1,23 @@ |
|||
package io.sc.platform.security.exception; |
|||
|
|||
public class AccountExpiredException extends RuntimeException{ |
|||
public AccountExpiredException() { |
|||
super(); |
|||
} |
|||
|
|||
public AccountExpiredException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { |
|||
super(message, cause, enableSuppression, writableStackTrace); |
|||
} |
|||
|
|||
public AccountExpiredException(String message, Throwable cause) { |
|||
super(message, cause); |
|||
} |
|||
|
|||
public AccountExpiredException(String message) { |
|||
super(message); |
|||
} |
|||
|
|||
public AccountExpiredException(Throwable cause) { |
|||
super(cause); |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package io.sc.platform.security.exception; |
|||
|
|||
public class AccountLockedException extends RuntimeException{ |
|||
public AccountLockedException() { |
|||
super(); |
|||
} |
|||
|
|||
public AccountLockedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { |
|||
super(message, cause, enableSuppression, writableStackTrace); |
|||
} |
|||
|
|||
public AccountLockedException(String message, Throwable cause) { |
|||
super(message, cause); |
|||
} |
|||
|
|||
public AccountLockedException(String message) { |
|||
super(message); |
|||
} |
|||
|
|||
public AccountLockedException(Throwable cause) { |
|||
super(cause); |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package io.sc.platform.security.exception; |
|||
|
|||
public class CredentialsExpiredException extends RuntimeException{ |
|||
public CredentialsExpiredException() { |
|||
super(); |
|||
} |
|||
|
|||
public CredentialsExpiredException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { |
|||
super(message, cause, enableSuppression, writableStackTrace); |
|||
} |
|||
|
|||
public CredentialsExpiredException(String message, Throwable cause) { |
|||
super(message, cause); |
|||
} |
|||
|
|||
public CredentialsExpiredException(String message) { |
|||
super(message); |
|||
} |
|||
|
|||
public CredentialsExpiredException(Throwable cause) { |
|||
super(cause); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue