diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/modules/authentication/implementations/Auth0AuthenticationModule.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/modules/authentication/implementations/Auth0AuthenticationModule.java index baa1be72..8b871ac1 100644 --- a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/modules/authentication/implementations/Auth0AuthenticationModule.java +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/modules/authentication/implementations/Auth0AuthenticationModule.java @@ -247,10 +247,7 @@ public class Auth0AuthenticationModule implements QAuthenticationModuleInterface ////////////////////////////////////////////////////////////// // allow customizer to do custom things here, if so desired // ////////////////////////////////////////////////////////////// - if(getCustomizer() != null) - { - getCustomizer().finalCustomizeSession(qInstance, qSession); - } + finalCustomizeSession(qInstance, qSession); return (qSession); } @@ -311,14 +308,7 @@ public class Auth0AuthenticationModule implements QAuthenticationModuleInterface ////////////////////////////////////////////////////////////// // allow customizer to do custom things here, if so desired // ////////////////////////////////////////////////////////////// - if(getCustomizer() != null) - { - QContext.withTemporaryContext(QContext.capture(), () -> - { - QContext.setQSession(getChickenAndEggSession()); - getCustomizer().finalCustomizeSession(qInstance, qSession); - }); - } + finalCustomizeSession(qInstance, qSession); return (qSession); } @@ -364,6 +354,23 @@ public class Auth0AuthenticationModule implements QAuthenticationModuleInterface + /*************************************************************************** + ** + ***************************************************************************/ + private void finalCustomizeSession(QInstance qInstance, QSession qSession) + { + if(getCustomizer() != null) + { + QContext.withTemporaryContext(QContext.capture(), () -> + { + QContext.setQSession(getChickenAndEggSession()); + getCustomizer().finalCustomizeSession(qInstance, qSession); + }); + } + } + + + /******************************************************************************* ** Insert a session as a new record into userSession table *******************************************************************************/