diff --git a/cas/src/main/java/org/springframework/security/cas/jackson2/AssertionImplMixin.java b/cas/src/main/java/org/springframework/security/cas/jackson2/AssertionImplMixin.java
index 069c0bdcd3..cd67eecae5 100644
--- a/cas/src/main/java/org/springframework/security/cas/jackson2/AssertionImplMixin.java
+++ b/cas/src/main/java/org/springframework/security/cas/jackson2/AssertionImplMixin.java
@@ -36,7 +36,7 @@ import java.util.Map;
*
* @author Jitendra Singh
* @see CasJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/cas/src/main/java/org/springframework/security/cas/jackson2/AttributePrincipalImplMixin.java b/cas/src/main/java/org/springframework/security/cas/jackson2/AttributePrincipalImplMixin.java
index 9d24e06946..d46a4ca472 100644
--- a/cas/src/main/java/org/springframework/security/cas/jackson2/AttributePrincipalImplMixin.java
+++ b/cas/src/main/java/org/springframework/security/cas/jackson2/AttributePrincipalImplMixin.java
@@ -33,7 +33,7 @@ import java.util.Map;
*
* @author Jitendra Singh
* @see CasJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/cas/src/main/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixin.java b/cas/src/main/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixin.java
index c6884f049c..1e01fb84d4 100644
--- a/cas/src/main/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixin.java
+++ b/cas/src/main/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixin.java
@@ -42,7 +42,7 @@ import java.util.Collection;
*
* @author Jitendra Singh
* @see CasJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/cas/src/main/java/org/springframework/security/cas/jackson2/CasJackson2Module.java b/cas/src/main/java/org/springframework/security/cas/jackson2/CasJackson2Module.java
index 82d7054678..700bde21ea 100644
--- a/cas/src/main/java/org/springframework/security/cas/jackson2/CasJackson2Module.java
+++ b/cas/src/main/java/org/springframework/security/cas/jackson2/CasJackson2Module.java
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
import org.jasig.cas.client.authentication.AttributePrincipalImpl;
import org.jasig.cas.client.validation.AssertionImpl;
import org.springframework.security.cas.authentication.CasAuthenticationToken;
-import org.springframework.security.jackson2.SecurityJacksonModules;
+import org.springframework.security.jackson2.SecurityJackson2Modules;
/**
* Jackson module for spring-security-cas. This module register {@link AssertionImplMixin},
@@ -34,10 +34,10 @@ import org.springframework.security.jackson2.SecurityJacksonModules;
* ObjectMapper mapper = new ObjectMapper();
* mapper.registerModule(new CasJackson2Module());
*
- * Note: use {@link SecurityJacksonModules#getModules(ClassLoader)} to get list of all security modules on the classpath.
+ * Note: use {@link SecurityJackson2Modules#getModules(ClassLoader)} to get list of all security modules on the classpath.
*
* @author Jitendra Singh.
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
public class CasJackson2Module extends SimpleModule {
@@ -48,7 +48,7 @@ public class CasJackson2Module extends SimpleModule {
@Override
public void setupModule(SetupContext context) {
- SecurityJacksonModules.enableDefaultTyping((ObjectMapper) context.getOwner());
+ SecurityJackson2Modules.enableDefaultTyping((ObjectMapper) context.getOwner());
context.setMixInAnnotations(AssertionImpl.class, AssertionImplMixin.class);
context.setMixInAnnotations(AttributePrincipalImpl.class, AttributePrincipalImplMixin.class);
context.setMixInAnnotations(CasAuthenticationToken.class, CasAuthenticationTokenMixin.class);
diff --git a/cas/src/test/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixinTests.java b/cas/src/test/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixinTests.java
index 523ca94076..665e1a8a7e 100644
--- a/cas/src/test/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixinTests.java
+++ b/cas/src/test/java/org/springframework/security/cas/jackson2/CasAuthenticationTokenMixinTests.java
@@ -36,7 +36,7 @@ import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.jackson2.SecurityJacksonModules;
+import org.springframework.security.jackson2.SecurityJackson2Modules;
import static org.assertj.core.api.Assertions.assertThat;
@@ -103,7 +103,7 @@ public class CasAuthenticationTokenMixinTests {
public void setup() {
mapper = new ObjectMapper();
ClassLoader loader = getClass().getClassLoader();
- mapper.registerModules(SecurityJacksonModules.getModules(loader));
+ mapper.registerModules(SecurityJackson2Modules.getModules(loader));
}
@Test
diff --git a/core/src/main/java/org/springframework/security/jackson2/AnonymousAuthenticationTokenMixin.java b/core/src/main/java/org/springframework/security/jackson2/AnonymousAuthenticationTokenMixin.java
index 2ad528dc19..560217aaa0 100644
--- a/core/src/main/java/org/springframework/security/jackson2/AnonymousAuthenticationTokenMixin.java
+++ b/core/src/main/java/org/springframework/security/jackson2/AnonymousAuthenticationTokenMixin.java
@@ -35,7 +35,7 @@ import java.util.Collection;
*
* @author Jitendra Singh
* @see CoreJackson2Module
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/core/src/main/java/org/springframework/security/jackson2/CoreJackson2Module.java b/core/src/main/java/org/springframework/security/jackson2/CoreJackson2Module.java
index 7ae476d4f7..b21de20bfa 100644
--- a/core/src/main/java/org/springframework/security/jackson2/CoreJackson2Module.java
+++ b/core/src/main/java/org/springframework/security/jackson2/CoreJackson2Module.java
@@ -38,12 +38,13 @@ import java.util.Collections;
* ObjectMapper mapper = new ObjectMapper();
* mapper.registerModule(new CoreJackson2Module());
*
- * Note: use {@link SecurityJacksonModules#getModules(ClassLoader)} to get list of all security modules.
+ * Note: use {@link SecurityJackson2Modules#getModules(ClassLoader)} to get list of all security modules.
*
* @author Jitendra Singh.
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
+@SuppressWarnings("serial")
public class CoreJackson2Module extends SimpleModule {
public CoreJackson2Module() {
@@ -52,7 +53,7 @@ public class CoreJackson2Module extends SimpleModule {
@Override
public void setupModule(SetupContext context) {
- SecurityJacksonModules.enableDefaultTyping((ObjectMapper) context.getOwner());
+ SecurityJackson2Modules.enableDefaultTyping((ObjectMapper) context.getOwner());
context.setMixInAnnotations(AnonymousAuthenticationToken.class, AnonymousAuthenticationTokenMixin.class);
context.setMixInAnnotations(RememberMeAuthenticationToken.class, RememberMeAuthenticationTokenMixin.class);
context.setMixInAnnotations(SimpleGrantedAuthority.class, SimpleGrantedAuthorityMixin.class);
diff --git a/core/src/main/java/org/springframework/security/jackson2/RememberMeAuthenticationTokenMixin.java b/core/src/main/java/org/springframework/security/jackson2/RememberMeAuthenticationTokenMixin.java
index a9d5acd9d6..ad2e600d2f 100644
--- a/core/src/main/java/org/springframework/security/jackson2/RememberMeAuthenticationTokenMixin.java
+++ b/core/src/main/java/org/springframework/security/jackson2/RememberMeAuthenticationTokenMixin.java
@@ -41,7 +41,7 @@ import java.util.Collection;
*
* @author Jitendra Singh
* @see CoreJackson2Module
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/core/src/main/java/org/springframework/security/jackson2/SecurityJacksonModules.java b/core/src/main/java/org/springframework/security/jackson2/SecurityJackson2Modules.java
similarity index 95%
rename from core/src/main/java/org/springframework/security/jackson2/SecurityJacksonModules.java
rename to core/src/main/java/org/springframework/security/jackson2/SecurityJackson2Modules.java
index 9a6f1be73e..e97482eeaf 100644
--- a/core/src/main/java/org/springframework/security/jackson2/SecurityJacksonModules.java
+++ b/core/src/main/java/org/springframework/security/jackson2/SecurityJackson2Modules.java
@@ -34,7 +34,7 @@ import java.util.List;
*
*
* ObjectMapper mapper = new ObjectMapper();
- * mapper.registerModules(SecurityJacksonModules.getModules());
+ * mapper.registerModules(SecurityJackson2Modules.getModules());
*
* Above code is equivalent to
*
@@ -49,16 +49,16 @@ import java.util.List;
* @author Jitendra Singh.
* @since 4.2
*/
-public final class SecurityJacksonModules {
+public final class SecurityJackson2Modules {
- private static final Log logger = LogFactory.getLog(SecurityJacksonModules.class);
+ private static final Log logger = LogFactory.getLog(SecurityJackson2Modules.class);
private static final List securityJackson2ModuleClasses = Arrays.asList(
"org.springframework.security.jackson2.CoreJackson2Module",
"org.springframework.security.cas.jackson2.CasJackson2Module",
"org.springframework.security.web.jackson2.WebJackson2Module"
);
- private SecurityJacksonModules() {
+ private SecurityJackson2Modules() {
}
public static void enableDefaultTyping(ObjectMapper mapper) {
diff --git a/core/src/main/java/org/springframework/security/jackson2/SimpleGrantedAuthorityMixin.java b/core/src/main/java/org/springframework/security/jackson2/SimpleGrantedAuthorityMixin.java
index 652cd99f0e..f1597255e7 100644
--- a/core/src/main/java/org/springframework/security/jackson2/SimpleGrantedAuthorityMixin.java
+++ b/core/src/main/java/org/springframework/security/jackson2/SimpleGrantedAuthorityMixin.java
@@ -28,7 +28,7 @@ import com.fasterxml.jackson.annotation.*;
*
* @author Jitendra Singh
* @see CoreJackson2Module
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/core/src/main/java/org/springframework/security/jackson2/UnmodifiableSetMixin.java b/core/src/main/java/org/springframework/security/jackson2/UnmodifiableSetMixin.java
index e2054eb835..1a03a12b18 100644
--- a/core/src/main/java/org/springframework/security/jackson2/UnmodifiableSetMixin.java
+++ b/core/src/main/java/org/springframework/security/jackson2/UnmodifiableSetMixin.java
@@ -34,7 +34,7 @@ import java.util.Set;
* @author Jitendra Singh
* @see UnmodifiableSetDeserializer
* @see CoreJackson2Module
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/core/src/main/java/org/springframework/security/jackson2/UserMixin.java b/core/src/main/java/org/springframework/security/jackson2/UserMixin.java
index 3922b10b48..b2c760cfd5 100644
--- a/core/src/main/java/org/springframework/security/jackson2/UserMixin.java
+++ b/core/src/main/java/org/springframework/security/jackson2/UserMixin.java
@@ -37,7 +37,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
* @author Jitendra Singh
* @see UserDeserializer
* @see CoreJackson2Module
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/core/src/main/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixin.java b/core/src/main/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixin.java
index 8ab154e146..1e19c8a7c5 100644
--- a/core/src/main/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixin.java
+++ b/core/src/main/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixin.java
@@ -37,7 +37,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
*
* @author Jitendra Singh
* @see CoreJackson2Module
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
diff --git a/core/src/test/java/org/springframework/security/jackson2/AbstractMixinTests.java b/core/src/test/java/org/springframework/security/jackson2/AbstractMixinTests.java
index 824552f25a..47f274d709 100644
--- a/core/src/test/java/org/springframework/security/jackson2/AbstractMixinTests.java
+++ b/core/src/test/java/org/springframework/security/jackson2/AbstractMixinTests.java
@@ -33,7 +33,7 @@ public abstract class AbstractMixinTests {
public void setup() {
mapper = new ObjectMapper();
ClassLoader loader = getClass().getClassLoader();
- mapper.registerModules(SecurityJacksonModules.getModules(loader));
+ mapper.registerModules(SecurityJackson2Modules.getModules(loader));
}
User createDefaultUser() {
diff --git a/docs/manual/src/docs/asciidoc/_includes/jackson.adoc b/docs/manual/src/docs/asciidoc/_includes/jackson.adoc
index cf6c3bd145..47278934c7 100644
--- a/docs/manual/src/docs/asciidoc/_includes/jackson.adoc
+++ b/docs/manual/src/docs/asciidoc/_includes/jackson.adoc
@@ -10,7 +10,7 @@ To use it, register the `JacksonJacksonModules.getModules(ClassLoader)` as http:
----
ObjectMapper mapper = new ObjectMapper();
ClassLoader loader = getClass().getClassLoader();
-List modules = SecurityJacksonModules.getModules(loader);
+List modules = SecurityJackson2Modules.getModules(loader);
mapper.registerModules(modules);
// ... use ObjectMapper as normally ...
diff --git a/web/src/main/java/org/springframework/security/web/jackson2/CookieMixin.java b/web/src/main/java/org/springframework/security/web/jackson2/CookieMixin.java
index 6e386045bc..545c230e0a 100644
--- a/web/src/main/java/org/springframework/security/web/jackson2/CookieMixin.java
+++ b/web/src/main/java/org/springframework/security/web/jackson2/CookieMixin.java
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
*
* @author Jitendra Singh
* @see WebJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/web/src/main/java/org/springframework/security/web/jackson2/DefaultCsrfTokenMixin.java b/web/src/main/java/org/springframework/security/web/jackson2/DefaultCsrfTokenMixin.java
index 9533dcef0c..0e1de7c1c8 100644
--- a/web/src/main/java/org/springframework/security/web/jackson2/DefaultCsrfTokenMixin.java
+++ b/web/src/main/java/org/springframework/security/web/jackson2/DefaultCsrfTokenMixin.java
@@ -32,7 +32,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
*
* @author Jitendra Singh
* @see WebJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
diff --git a/web/src/main/java/org/springframework/security/web/jackson2/DefaultSavedRequestMixin.java b/web/src/main/java/org/springframework/security/web/jackson2/DefaultSavedRequestMixin.java
index 449a4a09ba..7b1ffbf78a 100644
--- a/web/src/main/java/org/springframework/security/web/jackson2/DefaultSavedRequestMixin.java
+++ b/web/src/main/java/org/springframework/security/web/jackson2/DefaultSavedRequestMixin.java
@@ -34,7 +34,7 @@ import org.springframework.security.web.savedrequest.DefaultSavedRequest;
*
* @author Jitendra Singh
* @see WebJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/web/src/main/java/org/springframework/security/web/jackson2/SavedCookieMixin.java b/web/src/main/java/org/springframework/security/web/jackson2/SavedCookieMixin.java
index d8cc287db2..f8fbabec78 100644
--- a/web/src/main/java/org/springframework/security/web/jackson2/SavedCookieMixin.java
+++ b/web/src/main/java/org/springframework/security/web/jackson2/SavedCookieMixin.java
@@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.*;
*
* @author Jitendra Singh.
* @see WebJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/web/src/main/java/org/springframework/security/web/jackson2/WebAuthenticationDetailsMixin.java b/web/src/main/java/org/springframework/security/web/jackson2/WebAuthenticationDetailsMixin.java
index 2f60f9b31d..ebccab34f4 100644
--- a/web/src/main/java/org/springframework/security/web/jackson2/WebAuthenticationDetailsMixin.java
+++ b/web/src/main/java/org/springframework/security/web/jackson2/WebAuthenticationDetailsMixin.java
@@ -28,7 +28,7 @@ import com.fasterxml.jackson.annotation.*;
*
* @author Jitendra Singh
* @see WebJackson2Module
- * @see org.springframework.security.jackson2.SecurityJacksonModules
+ * @see org.springframework.security.jackson2.SecurityJackson2Modules
* @since 4.2
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
diff --git a/web/src/main/java/org/springframework/security/web/jackson2/WebJackson2Module.java b/web/src/main/java/org/springframework/security/web/jackson2/WebJackson2Module.java
index 3d8dbe6b12..d9408be734 100644
--- a/web/src/main/java/org/springframework/security/web/jackson2/WebJackson2Module.java
+++ b/web/src/main/java/org/springframework/security/web/jackson2/WebJackson2Module.java
@@ -16,16 +16,17 @@
package org.springframework.security.web.jackson2;
-import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.springframework.security.jackson2.SecurityJacksonModules;
+import javax.servlet.http.Cookie;
+
+import org.springframework.security.jackson2.SecurityJackson2Modules;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.security.web.csrf.DefaultCsrfToken;
import org.springframework.security.web.savedrequest.DefaultSavedRequest;
import org.springframework.security.web.savedrequest.SavedCookie;
-import javax.servlet.http.Cookie;
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
/**
* Jackson module for spring-security-web. This module register {@link CookieMixin},
@@ -37,10 +38,10 @@ import javax.servlet.http.Cookie;
* ObjectMapper mapper = new ObjectMapper();
* mapper.registerModule(new WebJackson2Module());
*
- * Note: use {@link SecurityJacksonModules#getModules(ClassLoader)} to get list of all security modules.
+ * Note: use {@link SecurityJackson2Modules#getModules(ClassLoader)} to get list of all security modules.
*
* @author Jitendra Singh
- * @see SecurityJacksonModules
+ * @see SecurityJackson2Modules
* @since 4.2
*/
public class WebJackson2Module extends SimpleModule {
@@ -51,7 +52,7 @@ public class WebJackson2Module extends SimpleModule {
@Override
public void setupModule(SetupContext context) {
- SecurityJacksonModules.enableDefaultTyping((ObjectMapper) context.getOwner());
+ SecurityJackson2Modules.enableDefaultTyping((ObjectMapper) context.getOwner());
context.setMixInAnnotations(Cookie.class, CookieMixin.class);
context.setMixInAnnotations(SavedCookie.class, SavedCookieMixin.class);
context.setMixInAnnotations(DefaultCsrfToken.class, DefaultCsrfTokenMixin.class);
diff --git a/web/src/test/java/org/springframework/security/web/jackson2/AbstractMixinTests.java b/web/src/test/java/org/springframework/security/web/jackson2/AbstractMixinTests.java
index 0be28e8a81..544bcdfc2c 100644
--- a/web/src/test/java/org/springframework/security/web/jackson2/AbstractMixinTests.java
+++ b/web/src/test/java/org/springframework/security/web/jackson2/AbstractMixinTests.java
@@ -19,7 +19,7 @@ package org.springframework.security.web.jackson2;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
-import org.springframework.security.jackson2.SecurityJacksonModules;
+import org.springframework.security.jackson2.SecurityJackson2Modules;
/**
* @author Jitenra Singh
@@ -33,6 +33,6 @@ public abstract class AbstractMixinTests {
public void setup() {
mapper = new ObjectMapper();
ClassLoader loader = getClass().getClassLoader();
- mapper.registerModules(SecurityJacksonModules.getModules(loader));
+ mapper.registerModules(SecurityJackson2Modules.getModules(loader));
}
}