Skip to content

Commit

Permalink
Merge branch '6.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusdacoregio committed Sep 9, 2024
2 parents 9f0cbe6 + aeae740 commit 4855287
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public final class SecurityJackson2Modules {

private static final List<String> securityJackson2ModuleClasses = Arrays.asList(
"org.springframework.security.jackson2.CoreJackson2Module",
"org.springframework.security.cas.jackson2.CasJackson2Module",
"org.springframework.security.web.jackson2.WebJackson2Module",
"org.springframework.security.web.server.jackson2.WebServerJackson2Module");

Expand All @@ -89,6 +88,8 @@ public final class SecurityJackson2Modules {

private static final String saml2Jackson2ModuleClass = "org.springframework.security.saml2.jackson2.Saml2Jackson2Module";

private static final String casJackson2ModuleClass = "org.springframework.security.cas.jackson2.CasJackson2Module";

private static final boolean webServletPresent;

private static final boolean oauth2ClientPresent;
Expand All @@ -99,6 +100,8 @@ public final class SecurityJackson2Modules {

private static final boolean saml2JacksonPresent;

private static final boolean casJacksonPresent;

static {
ClassLoader classLoader = SecurityJackson2Modules.class.getClassLoader();
webServletPresent = ClassUtils.isPresent("jakarta.servlet.http.Cookie", classLoader);
Expand All @@ -107,6 +110,7 @@ public final class SecurityJackson2Modules {
javaTimeJacksonPresent = ClassUtils.isPresent(javaTimeJackson2ModuleClass, classLoader);
ldapJacksonPresent = ClassUtils.isPresent(ldapJackson2ModuleClass, classLoader);
saml2JacksonPresent = ClassUtils.isPresent(saml2Jackson2ModuleClass, classLoader);
casJacksonPresent = ClassUtils.isPresent(casJackson2ModuleClass, classLoader);
}

private SecurityJackson2Modules() {
Expand Down Expand Up @@ -160,6 +164,9 @@ public static List<Module> getModules(ClassLoader loader) {
if (saml2JacksonPresent) {
addToModulesList(loader, modules, saml2Jackson2ModuleClass);
}
if (casJacksonPresent) {
addToModulesList(loader, modules, casJackson2ModuleClass);
}
return modules;
}

Expand Down

0 comments on commit 4855287

Please sign in to comment.