This commit is contained in:
2026-08-13 12:22:31 +08:00
parent 16dc03a2e2
commit e742abd1cf
49 changed files with 821 additions and 50 deletions
@@ -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/**
@@ -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");
}
}