Browse Source

oauth2.1 flow test

pull/4/head
shengzhaoli.shengz 1 year ago
parent
commit
138bf87e58
  1. 2
      src/main/java/com/monkeyk/sos/config/WebSecurityConfigurer.java
  2. 2
      src/main/resources/templates/clientdetails/test_client.html
  3. 4
      src/main/resources/templates/login.html

2
src/main/java/com/monkeyk/sos/config/WebSecurityConfigurer.java

@ -66,7 +66,7 @@ public class WebSecurityConfigurer {
formLoginConfigurer
.loginPage("/login")
.loginProcessingUrl("/signin")
.failureUrl("/login?error=1")
.failureUrl("/login?error_failed=true")
// .defaultSuccessUrl("/")
.usernameParameter("oidc_user")
.passwordParameter("oidcPwd");

2
src/main/resources/templates/clientdetails/test_client.html

@ -57,7 +57,7 @@
<code>用 'code' 换取 'access_token'</code>
<br/>
输入第一步获取的code: <input type="text" name="code" value="" ng-model="code"
required="required"/>
required="required" size="70"/>
<br/>
<form th:action="@{/oauth2/token}" th:method="post" target="_blank">

4
src/main/resources/templates/login.html

@ -44,9 +44,9 @@
<div class="col-sm-9">
<input type="submit" value="Login" class="btn btn-primary"/>
<span th:if="${param.get('error') == 2}"
<span th:if="${param.access_denied}"
class="label label-danger">Access denied !!!</span>
<span th:if="${param.error == 1}"
<span th:if="${param.error_failed}"
class="label label-danger">Authentication Failure</span>
</div>
</div>

Loading…
Cancel
Save