init project v1.0.0
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://${zlt.datasource.ip}:3306/oauth-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
|
||||
username: ${zlt.datasource.username}
|
||||
password: ${zlt.datasource.password}
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
|
||||
redis:
|
||||
host: ${zlt.redis.host}
|
||||
port: ${zlt.redis.port}
|
||||
timeout: ${zlt.redis.timeout}
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||
#实体扫描,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: com.central.oauth.model
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
|
||||
zlt:
|
||||
oauth2:
|
||||
token:
|
||||
store:
|
||||
type: authJwt
|
||||
swagger:
|
||||
enabled: true
|
||||
title: 认证中心
|
||||
description: 认证中心接口文档
|
||||
version: 1.0
|
||||
base-package: com.central.oauth.controller
|
||||
security:
|
||||
ignore:
|
||||
# 忽略认证的地址
|
||||
httpUrls: >
|
||||
/validata/**,
|
||||
/clients,
|
||||
/clients/**,
|
||||
/login.html,
|
||||
/css/**,
|
||||
/images/**,
|
||||
/js/**
|
||||
code:
|
||||
# 忽略验证码的应用编号
|
||||
ignoreClientCode: app
|
||||
@@ -0,0 +1,20 @@
|
||||
server:
|
||||
port: 8000
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: uaa-server
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: common.yml
|
||||
discovery:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
|
||||
encrypt:
|
||||
key-store:
|
||||
location: classpath:zlt.jks
|
||||
secret: zlt!@#$
|
||||
alias: zlt
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.central.oauth.mapper.ClientMapper">
|
||||
|
||||
<sql id="where">
|
||||
<where>
|
||||
<if test="params.clientId!= null and params.clientId != ''">
|
||||
and client_id = #{params.clientId}
|
||||
</if>
|
||||
<if test="params.resourceIds != null and params.resourceIds != ''">
|
||||
and resource_ids = #{params.resourceIds}
|
||||
</if>
|
||||
<if test="params.clientSecret != null and params.clientSecret != ''">
|
||||
and client_secret = #{params.clientSecret}
|
||||
</if>
|
||||
<if test="params.scope != null and params.scope != ''">
|
||||
and scope = #{params.scope}
|
||||
</if>
|
||||
<if test="params.authorizedGrantTypes != null and params.authorizedGrantTypes != ''">
|
||||
and authorized_grant_types = #{params.authorizedGrantTypes}
|
||||
</if>
|
||||
<if test="params.webServerRedirectUri != null and params.webServerRedirectUri != ''">
|
||||
and web_server_redirect_uri = #{params.webServerRedirectUri}
|
||||
</if>
|
||||
<if test="params.authorities != null and params.authorities != ''">
|
||||
and authorities = #{params.authorities}
|
||||
</if>
|
||||
<if test="params.accessTokenValidity != null and params.accessTokenValidity != ''">
|
||||
and access_token_validity = #{params.accessTokenValidity}
|
||||
</if>
|
||||
<if test="params.refreshTokenValidity != null and params.refreshTokenValidity != ''">
|
||||
and refresh_token_validity = #{params.refreshTokenValidity}
|
||||
</if>
|
||||
<if test="params.additionalInformation != null and params.additionalInformation != ''">
|
||||
and additional_information = #{params.additionalInformation}
|
||||
</if>
|
||||
<if test="params.autoapprove != null and params.autoapprove != ''">
|
||||
and autoapprove = #{params.autoapprove}
|
||||
</if>
|
||||
<if test="params.searchKey != null and params.searchKey != ''">
|
||||
and client_id like concat('%', #{params.searchKey}, '%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultType="com.central.oauth.model.Client">
|
||||
select id , client_id , resource_ids ,
|
||||
client_secret ,
|
||||
client_secret_str ,
|
||||
web_server_redirect_uri from oauth_client_details t
|
||||
<include refid="where"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,9 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjmgfejBXsPYynAIPczHA
|
||||
eEvTDfAVaNKQudyI7VszdezbHDM1CStCIgwiMmLd7QYf1SrrmQoqxhcSRbhjE3ej
|
||||
RF5qzhtx3kmepdpMrQptcsLjRkixaxCc4E2k6Us5707gGwbhoaTrRit5F2MnAdLY
|
||||
C1TS3WwnO/hQfqUcAglbK8yrJ4AwAv0DAoIUSWnWqzuniV1SYbdV57uswxUssoWy
|
||||
sEfPz+nv1ZLRs6Wz4eQ5Myqx2+CjWc9F8iXa2PV8Rmjms3dVbWcLUpCP18Dfzp8l
|
||||
n8vF9LfYB7UaLSpfJe6FFF6+vCg4JHfo12djTUgwGjauMF3e9mmjU83KIoQS66lp
|
||||
AQIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
@@ -0,0 +1,173 @@
|
||||
header{
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background: #1e1b29;
|
||||
border-bottom: solid 4px red;
|
||||
}
|
||||
.member_wrap{
|
||||
|
||||
}
|
||||
.header_item{
|
||||
overflow: hidden;
|
||||
}
|
||||
.header_item{
|
||||
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.menu_head{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 100px;
|
||||
border: solid 3px #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
.menu_head img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.menu_info{
|
||||
width:840px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.info_name{
|
||||
font-size: 18px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
.info_name_box{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.level{
|
||||
font-size: 14px;
|
||||
color: #f60;
|
||||
font-weight: bold;
|
||||
}
|
||||
.info_desc{
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
color: #FFF;
|
||||
}
|
||||
.banner_menu{
|
||||
width: 980px;
|
||||
height: 50px;
|
||||
margin: 20px auto;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
.nav_box{
|
||||
margin-top: 50px;
|
||||
}
|
||||
.nav_box ul {
|
||||
overflow: hidden;
|
||||
}
|
||||
.nav_box ul li{
|
||||
display: block;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.nav_box ul li a{
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
}
|
||||
.nav_box ul li a:hover{
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.login_wrap{
|
||||
background: url(/api-uaa/images/logo_bg.jpg) no-repeat center;
|
||||
/*background-size: 100%;*/
|
||||
}
|
||||
.logo{
|
||||
width: 500px;
|
||||
height: 150px;
|
||||
margin: 0px auto;
|
||||
background: url(/api-uaa/images/logowz.png) no-repeat center;
|
||||
}
|
||||
.login_box{
|
||||
width: 360px;
|
||||
background: #FFFFFF;
|
||||
margin: 0px auto;
|
||||
}
|
||||
.login_title{
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
color: #FF7F50;
|
||||
padding: 15px 0;
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
border-bottom: solid 1px #CCCCCC;
|
||||
}
|
||||
.form_text_ipt{
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
border: solid 1px #CCCCCC;
|
||||
margin: 20px auto 0 auto;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.form_check_ipt{
|
||||
width: 300px;
|
||||
margin: 10px auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.form_text_ipt input{
|
||||
width: 290px;
|
||||
height: 30px;
|
||||
margin: 5px;
|
||||
border: none;
|
||||
font-family: "微软雅黑";
|
||||
font-size: 15px;
|
||||
color: #666;
|
||||
}
|
||||
.check_left label{
|
||||
cursor: pointer;
|
||||
}
|
||||
.check_left label input{
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
.form_btn{
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.form_btn button{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
color: #FFFFFF;
|
||||
font-size: 14px;
|
||||
background: #FF7F50;
|
||||
cursor: pointer;
|
||||
}
|
||||
.form_reg_btn{
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.other_login{
|
||||
overflow: hidden;
|
||||
width: 300px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
.other_left{
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.other_right a{
|
||||
margin:5px;
|
||||
color:#636363;
|
||||
}
|
||||
|
||||
.other_right a:hover{
|
||||
color:#AEEEEE;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*reset*/
|
||||
*{padding: 0;margin: 0;}
|
||||
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, menu, nav, section, time, mark, audio, video, details, summary {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font-weight: normal;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
}
|
||||
article, aside, figure, footer, header, nav, section, details, summary {display: block;}
|
||||
html, body { height: 100%; color: #333; font-size: 12px; font-family: "微软雅黑",MicrosoftYaHei;}
|
||||
a { text-decoration: none; color: #3cf; -webkit-tap-highlight-color: transparent;}
|
||||
li{list-style: none;}
|
||||
table{border-collapse: collapse;}
|
||||
input {outline: medium none;font-family: "微软雅黑",MicrosoftYaHei;font-size: 14px;}
|
||||
button{font-family:"微软雅黑",MicrosoftYaHei;}
|
||||
em {font-style: normal;}
|
||||
.wrap{max-width: 100%;min-height: 100%;overflow: hidden;margin: 0 auto;background: #ccc;}
|
||||
|
||||
.left{float: left;}
|
||||
.right{float: right;}
|
||||
.clear{clear:both;}
|
||||
.red{color: #f60;}
|
||||
|
||||
.ececk_warning{
|
||||
font-size: 13px;
|
||||
color: red;
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
display: none;
|
||||
}
|
||||
._warning{
|
||||
font-size: 13px;
|
||||
color: red;
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 331 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
@@ -0,0 +1,37 @@
|
||||
$(function(){
|
||||
|
||||
//
|
||||
$('.form_text_ipt input').focus(function(){
|
||||
$(this).parent().css({
|
||||
'box-shadow':'0 0 3px #bbb',
|
||||
});
|
||||
});
|
||||
$('.form_text_ipt input').blur(function(){
|
||||
$(this).parent().css({
|
||||
'box-shadow':'none',
|
||||
});
|
||||
//$(this).parent().next().hide();
|
||||
});
|
||||
|
||||
//
|
||||
$('.form_text_ipt input').bind('input propertychange',function(){
|
||||
if($(this).val()==""){
|
||||
$(this).css({
|
||||
'color':'red',
|
||||
});
|
||||
$(this).parent().css({
|
||||
'border':'solid 1px red',
|
||||
});
|
||||
//$(this).parent().next().find('span').html('helow');
|
||||
$(this).parent().next().show();
|
||||
}else{
|
||||
$(this).css({
|
||||
'color':'#ccc',
|
||||
});
|
||||
$(this).parent().css({
|
||||
'border':'solid 1px #ccc',
|
||||
});
|
||||
$(this).parent().next().hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>登录界面</title>
|
||||
<link rel="stylesheet" href="/api-uaa/css/reset.css"/>
|
||||
<link rel="stylesheet" href="/api-uaa/css/common.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap login_wrap">
|
||||
<div class="content">
|
||||
<div class="logo"></div>
|
||||
<div class="login_box">
|
||||
|
||||
<div class="login_form">
|
||||
<div class="login_title">
|
||||
登录
|
||||
</div>
|
||||
<form action="/user/login" method="post">
|
||||
<div class="form_text_ipt">
|
||||
<input name="username" type="text" placeholder="用户名" value="admin">
|
||||
</div>
|
||||
<div class="ececk_warning"><span>用户名不能为空</span></div>
|
||||
<div class="_warning"><span></span></div>
|
||||
<div class="form_text_ipt">
|
||||
<input name="password" type="password" placeholder="密码" value="admin">
|
||||
</div>
|
||||
<div class="ececk_warning"><span>密码不能为空</span></div>
|
||||
<div class="form_btn">
|
||||
<button type="submit">登录</button>
|
||||
</div>
|
||||
<div class="form_reg_btn">
|
||||
<!--span>还没有帐号?</span><a href="/register">马上注册</a-->
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/api-uaa/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/api-uaa/js/common.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
Reference in New Issue
Block a user