Commit bd76b5ad authored by hubin's avatar hubin

登陆请求直接放行

parent 2a13e840
......@@ -51,7 +51,7 @@ public class ResourceServerConfig {
http.oauth2ResourceServer().jwt()
.jwtAuthenticationConverter(jwtAuthenticationConverter());
http.authorizeExchange()
.pathMatchers("**/oauth/token").permitAll()
.pathMatchers("/oauth/token").permitAll()
.anyExchange().access(authorizationManager)
.and()
.exceptionHandling()
......@@ -102,7 +102,7 @@ public class ResourceServerConfig {
}
public static Mono writeFailedToResponse(ServerHttpResponse response, ResultCode resultCode){
public static Mono writeFailedToResponse(ServerHttpResponse response, ResultCode resultCode) {
response.setStatusCode(HttpStatus.OK);
response.getHeaders().set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
response.getHeaders().set("Access-Control-Allow-Origin", "*");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment