Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: ac892247 <a.chmelo@gmail.com>
  • Loading branch information
achmelo committed Aug 28, 2024
1 parent b5f945d commit f1c10cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public class AuthConfigurationProperties {
private String gatewayQueryEndpoint = "/gateway/api/v1/auth/query";
private String gatewayTicketEndpoint = "/gateway/api/v1/auth/ticket";

private String gatewayLoginEndpointOldFormat = "/api/v1/gateway/auth/login";
private String gatewayLogoutEndpointOldFormat = "/api/v1/gateway/auth/logout";
private String gatewayQueryEndpointOldFormat = "/api/v1/gateway/auth/query";
private String gatewayTicketEndpointOldFormat = "/api/v1/gateway/auth/ticket";

private String zaasLoginEndpoint = "/zaas/api/v1/auth/login";
private String zaasLogoutEndpoint = "/zaas/api/v1/auth/logout";
private String zaasQueryEndpoint = "/zaas/api/v1/auth/query";
Expand All @@ -58,7 +53,6 @@ public class AuthConfigurationProperties {
private String gatewayEvictAccessTokensAndRules = "/gateway/auth/access-token/evict";
private String zaasEvictAccessTokensAndRules = "/zaas/api/v1/auth/access-token/evict";

private String gatewayRefreshEndpointOldFormat = "/api/v1/gateway/auth/refresh";
private String gatewayRefreshEndpoint = "/gateway/api/v1/auth/refresh";
private String zaasRefreshEndpoint = "/zaas/api/v1/auth/refresh";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,32 +334,16 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http, Au
CONFORMANCE_SHORT_URL,
CONFORMANCE_LONG_URL,
VALIDATE_SHORT_URL,
VALIDATE_LONG_URL
))
.authorizeExchange(authorizeExchangeSpec ->
authorizeExchangeSpec
.anyExchange().authenticated()
)
.addFilterAfter(new TokenAuthFilter(tokenProvider, authConfigurationProperties), SecurityWebFiltersOrder.AUTHENTICATION)
.addFilterAfter(new BasicAuthFilter(basicAuthProvider), SecurityWebFiltersOrder.AUTHENTICATION)
.build();
}

@Bean
@Order(2)
public SecurityWebFilterChain securityWebFilterChainForActuator(ServerHttpSecurity http, AuthConfigurationProperties authConfigurationProperties) {

return defaultSecurityConfig(http)
.securityMatcher(ServerWebExchangeMatchers.pathMatchers(
VALIDATE_LONG_URL,
"/application/**"
))
.authorizeExchange(authorizeExchangeSpec -> {
if (!isHealthEndpointProtected) {
authorizeExchangeSpec
.pathMatchers( "/application/info", "/application/version", "/application/health")
.permitAll();
}
else {
if (!isHealthEndpointProtected) {
authorizeExchangeSpec
.pathMatchers( "/application/info", "/application/version", "/application/health")
.permitAll();
}
else {
authorizeExchangeSpec
.pathMatchers( "/application/info", "/application/version")
.permitAll();
Expand Down

0 comments on commit f1c10cf

Please sign in to comment.