|
|
@@ -33,6 +33,7 @@ public class ResourceServerConfig {
|
|
|
http.oauth2ResourceServer().jwt()
|
|
|
.jwtAuthenticationConverter(jwtAuthenticationConverter());
|
|
|
http.authorizeExchange()
|
|
|
+ .pathMatchers(getAnonymousPaths()).permitAll()
|
|
|
.anyExchange().access(authorizationManager)
|
|
|
.and()
|
|
|
.exceptionHandling()
|
|
|
@@ -47,4 +48,18 @@ public class ResourceServerConfig {
|
|
|
jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(new RealmRoleConverter());
|
|
|
return new ReactiveJwtAuthenticationConverterAdapter(jwtAuthenticationConverter);
|
|
|
}
|
|
|
+
|
|
|
+ private String[] getAnonymousPaths() {
|
|
|
+ return new String[] {
|
|
|
+ "/ad/user/**",
|
|
|
+ "wxapplet/user/data",
|
|
|
+ "wxapplet/openid",
|
|
|
+ "wxapplet/userPhoneNumber",
|
|
|
+ "wxapplet/getToken/{code}",
|
|
|
+ "ai/audit/**",
|
|
|
+ "/applet/**",
|
|
|
+ "/notice/**",
|
|
|
+ "/wxpay/**",
|
|
|
+ "/websocket/**"} ;
|
|
|
+ }
|
|
|
}
|