优化
This commit is contained in:
@@ -164,6 +164,7 @@ baiyue:
|
||||
- /api/auth/login
|
||||
- /api/auth/register
|
||||
- /api/auth/refresh
|
||||
- /api/auth/impersonations/exchange
|
||||
- /openapi/v1/inbound-measurements/**
|
||||
- /actuator/health
|
||||
- /swagger-ui/**
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.baiyue.gateway.config;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class ImpersonationExchangeSecurityContractTest {
|
||||
@Test
|
||||
void permitsAnonymousImpersonationCodeExchangeAtTheGateway() throws Exception {
|
||||
String yaml = new ClassPathResource("application.yml")
|
||||
.getContentAsString(StandardCharsets.UTF_8);
|
||||
|
||||
assertThat(yaml)
|
||||
.contains("permit-paths:")
|
||||
.contains("- /api/auth/impersonations/exchange");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user