Skip to content

Commit 528c384

Browse files
committed
SB 4.0.1
1 parent e13ac88 commit 528c384

8 files changed

Lines changed: 18 additions & 19 deletions

File tree

src/inttest/resources/config/application.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ faf-api:
103103
region: auto
104104
user-upload-bucket: user-uploads
105105

106-
#logging:
107-
# level:
108-
# org.hibernate.SQL: DEBUG
109-
# org.hibernate.engine.spi.EntityEntry: TRACE
110-
# org.springframework.security: DEBUG
106+
logging:
107+
level:
108+
org.hibernate.SQL: DEBUG
109+
org.hibernate.engine.spi.EntityEntry: TRACE

src/main/java/com/faforever/api/config/security/WebSecurityConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
5656
"/users/register",
5757
"/users/activate",
5858
"/users/requestPasswordReset",
59-
"/users/requestPasswordReset",
6059
"/users/performPasswordReset",
60+
"/users/buildSteamPasswordResetUrl",
61+
"/users/requestPasswordResetViaSteam",
6162
"/users/linkToSteam/**"
6263
).permitAll();
6364
authorizeConfig.anyRequest().authenticated();

src/main/java/com/faforever/api/map/MapsController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.web.servlet.ModelAndView;
2323
import tools.jackson.core.JacksonException;
2424
import tools.jackson.databind.JsonNode;
25-
import tools.jackson.databind.ObjectMapper;
25+
import tools.jackson.databind.json.JsonMapper;
2626

2727
import java.io.IOException;
2828
import java.util.Map;
@@ -36,7 +36,7 @@
3636
public class MapsController {
3737
private final MapService mapService;
3838
private final FafApiProperties fafApiProperties;
39-
private final ObjectMapper objectMapper;
39+
private final JsonMapper objectMapper;
4040
private final PlayerService playerService;
4141

4242

src/main/java/com/faforever/api/security/FafTokenService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.springframework.util.Assert;
2121
import tools.jackson.core.JacksonException;
2222
import tools.jackson.core.type.TypeReference;
23-
import tools.jackson.databind.ObjectMapper;
23+
import tools.jackson.databind.json.JsonMapper;
2424

2525
import jakarta.validation.constraints.NotNull;
2626
import java.nio.file.Files;
@@ -38,11 +38,11 @@ public class FafTokenService {
3838
static final String KEY_ACTION = "action";
3939
static final String KEY_LIFETIME = "lifetime";
4040

41-
private final ObjectMapper objectMapper;
41+
private final JsonMapper objectMapper;
4242
private final RSASSASigner rsaSigner;
4343
private final RSASSAVerifier rsaVerifier;
4444

45-
public FafTokenService(ObjectMapper objectMapper, FafApiProperties properties) throws Exception {
45+
public FafTokenService(JsonMapper objectMapper, FafApiProperties properties) throws Exception {
4646
String secretKey = Files.readString(properties.getJwt().getSecretKeyPath());
4747
String publicKey = Files.readString(properties.getJwt().getPublicKeyPath());
4848

src/main/java/com/faforever/api/security/JwtService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import com.nimbusds.jose.crypto.RSASSAVerifier;
1515
import com.nimbusds.jose.jwk.RSAKey;
1616
import org.springframework.stereotype.Service;
17-
import tools.jackson.databind.ObjectMapper;
17+
import tools.jackson.databind.json.JsonMapper;
1818

1919
import jakarta.inject.Inject;
2020
import java.io.IOException;
@@ -26,10 +26,10 @@
2626
public class JwtService {
2727
private final RSASSASigner rsaSigner;
2828
private final RSASSAVerifier rsaVerifier;
29-
private final ObjectMapper objectMapper;
29+
private final JsonMapper objectMapper;
3030

3131
@Inject
32-
public JwtService(FafApiProperties fafApiProperties, ObjectMapper objectMapper) throws Exception {
32+
public JwtService(FafApiProperties fafApiProperties, JsonMapper objectMapper) throws Exception {
3333
String secretKey = Files.readString(fafApiProperties.getJwt().getSecretKeyPath());
3434
String publicKey = Files.readString(fafApiProperties.getJwt().getPublicKeyPath());
3535

src/main/java/com/faforever/api/user/UsersController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,4 @@ private void redirectCallbackResult(HttpServletResponse response, CallbackResult
194194
response.sendRedirect(uriBuilder.toUriString());
195195
}
196196
}
197-
198197
}

src/main/resources/config/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ spring:
129129
properties:
130130
hibernate:
131131
dialect: org.hibernate.dialect.MariaDBDialect
132-
jackson:
132+
jackson2:
133133
serialization:
134134
WRITE_DATES_AS_TIMESTAMPS: false
135135
profiles:

src/test/java/com/faforever/api/security/FafTokenServiceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.junit.jupiter.api.BeforeEach;
1212
import org.junit.jupiter.api.Test;
1313
import tools.jackson.core.type.TypeReference;
14-
import tools.jackson.databind.ObjectMapper;
14+
import tools.jackson.databind.json.JsonMapper;
1515

1616
import java.nio.file.Files;
1717
import java.nio.file.Paths;
@@ -59,7 +59,7 @@ public class FafTokenServiceTest {
5959
private final RSASSASigner rsaSigner;
6060
private final RSASSAVerifier rsaVerifier;
6161

62-
private ObjectMapper objectMapper;
62+
private JsonMapper objectMapper;
6363
private FafTokenService instance;
6464

6565
public FafTokenServiceTest() throws Exception {
@@ -75,7 +75,7 @@ public FafTokenServiceTest() throws Exception {
7575

7676
@BeforeEach
7777
public void setUp() throws Exception {
78-
objectMapper = new ObjectMapper();
78+
objectMapper = new JsonMapper();
7979

8080
FafApiProperties properties = new FafApiProperties();
8181
properties.getJwt().setSecretKeyPath(Paths.get("test-pki-private.key"));

0 commit comments

Comments
 (0)