- /auth
- /doctors
- /paths
Код: Выделить всё
package com.sb.projects.medica.gateway.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@Configuration
@EnableWebFluxSecurity
public class SecurityConfig {
@Bean
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity httpSecurity) {
httpSecurity.authorizeExchange(exchanges -> {
exchanges.pathMatchers("/doctor/**", "/patient/**").authenticated();
exchanges.pathMatchers("/auth/**").permitAll();
}).oauth2Client().and().oauth2ResourceServer().jwt();
return httpSecurity.build();
}
}
Ожидаемый токен CSRF не найден
Как устранить эту ошибку. Как создать токен csrf и отправить его во внешний интерфейс
Подробнее здесь: https://stackoverflow.com/questions/756 ... y-with-spr
Мобильная версия