Skip to content

Commit f2fdb17

Browse files
committed
login
1 parent 34d9f9f commit f2fdb17

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

forsrc-springboot-gwt-authorization/src/main/java/com/forsrc/boot/authorization/config/LoginConfig.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,19 @@ protected void configure(HttpSecurity http) throws Exception {
3333
.permitAll()
3434
.and()
3535
.requestMatchers()
36-
.antMatchers("/login", "/logout", "/oauth/authorize", "/oauth/confirm_access", "/test")
36+
.antMatchers("/", "/login", "/logout", "/oauth/authorize", "/oauth/confirm_access", "/test")
3737
.and()
38-
.antMatcher("/**")
3938
.authorizeRequests()
40-
.antMatchers("/oauth/token_key")
39+
.antMatchers("/test", "/oauth/token")
4140
.permitAll()
42-
.and()
43-
.antMatcher("/**")
44-
.authorizeRequests()
45-
.anyRequest()
46-
.authenticated()
4741
.and()
4842
.csrf()
4943
.ignoringAntMatchers("/test", "/oauth/token")
5044
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
5145
.and()
5246
.authorizeRequests()
53-
.anyRequest().authenticated();
47+
.anyRequest()
48+
.authenticated();
5449
;
5550
}
5651

@@ -75,4 +70,4 @@ public void commence(HttpServletRequest request, HttpServletResponse response,
7570
}
7671
};
7772
}
78-
}
73+
}

forsrc-springboot-gwt-authorization/src/main/java/com/forsrc/boot/authorization/config/OAuth2AuthorizationConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws E
4646
@Override
4747
public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
4848
security.tokenKeyAccess(authorizationServerProperties.getTokenKeyAccess());
49+
//security.tokenKeyAccess("permitAll()")
50+
//.checkTokenAccess("isAuthenticated()");
4951
}
5052

5153
@Bean

0 commit comments

Comments
 (0)