@@ -16,4 +16,5 @@ public class Oauth2Controller { | |||
public String login() { | |||
return "login"; | |||
} | |||
} |
@@ -4,6 +4,7 @@ import com.tuoheng.model.param.CreateUserDto; | |||
import com.tuoheng.service.UserSevice; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.security.access.prepost.PreAuthorize; | |||
import org.springframework.web.bind.annotation.*; | |||
/** |
@@ -36,7 +36,7 @@ public class RegisteredClientUtil { | |||
.scope(OidcScopes.OPENID) | |||
.scope(OidcScopes.PROFILE) | |||
.clientSettings(ClientSettings.builder() | |||
.requireAuthorizationConsent(true) | |||
.requireAuthorizationConsent(false) | |||
.requireProofKey(false) | |||
.build()) | |||
.tokenSettings(TokenSettings.builder() |
@@ -76,6 +76,15 @@ | |||
color: #FFFFFF; | |||
font-size: 16px; | |||
} | |||
.login__form .form__tips{ | |||
margin: 0; | |||
height: 0; | |||
position: relative; | |||
top: -14px; | |||
} | |||
.form__tips.is--error{ | |||
color: red | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
@@ -86,6 +95,9 @@ | |||
<form th:action="@{/login}" method="post"> | |||
<input name="username" placeholder="请输入用户名" type="text"/> | |||
<input name="password" placeholder="请输入密码" type="password"/> | |||
<div class="form__tips is--error" th:if="${param.error}"> | |||
Invalid username and password. | |||
</div> | |||
<!-- <input name="code" placeholder="请输入验证码" value="code" /> --> | |||
<button type="submit">登 录</button> | |||
</form> |