Skip to content

Commit

Permalink
Allow long deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
schnapster committed Jan 14, 2024
1 parent 6d0ae40 commit 77a0c2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/space/npstr/wolfia/config/Oauth2Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ public RedisSerializer<Object> springSessionDefaultRedisSerializer() {
private ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.registerModules(SecurityJackson2Modules.getModules(this.loader));
// https://github.com/spring-projects/spring-security/issues/12294#issuecomment-1401987517
mapper.addMixIn(Long.class, LongMixin.class);
return mapper;
}

public abstract static class LongMixin {}

/**
* Copypasta from {@link org.springframework.security.config.annotation.web.configuration.OAuth2ClientConfiguration.OAuth2ClientWebMvcSecurityConfiguration}
* <p>
Expand Down

0 comments on commit 77a0c2d

Please sign in to comment.