Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1518: Prefer List.of over guava ImmutableList #1519

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package io.getlime.security.powerauth.app.webflow.configuration;

import com.google.common.collect.ImmutableList;
import io.getlime.security.powerauth.lib.webflow.authentication.service.AuthenticationManagementService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
Expand Down Expand Up @@ -51,6 +50,7 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

/**
Expand Down Expand Up @@ -168,9 +168,9 @@ public CorsConfigurationSource corsConfigurationSource() {
// Configuration of CORS for client TLS certificate validation which can be requested from another host/port
final CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Collections.singletonList(corsAllowOrigin));
configuration.setAllowedMethods(ImmutableList.of("GET", "POST", "OPTIONS"));
configuration.setAllowedMethods(List.of("GET", "POST", "OPTIONS"));
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(ImmutableList.of("Content-Type", "X-CSRF-Token"));
configuration.setAllowedHeaders(List.of("Content-Type", "X-CSRF-Token"));
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/tls/client/login", configuration);
source.registerCorsConfiguration("/tls/client/approve", configuration);
Expand Down