pac4j-core/src/main/java/org/pac4j/core/engine/DefaultCallbackLogic.java
Method renewSession
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
protected void renewSession(final CallContext ctx, final Config config) {
val context = ctx.webContext();
val sessionStore = ctx.sessionStore();
val optOldSessionId = sessionStore.getSessionId(context, true);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method perform
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Object perform(final Config config, final String inputDefaultUrl, final Boolean inputRenewSession,
final String defaultClient, final FrameworkParameters parameters) {
LOGGER.debug("=== CALLBACK ===");
Method renewSession
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected void renewSession(final CallContext ctx, final Config config) {
val context = ctx.webContext();
val sessionStore = ctx.sessionStore();
val optOldSessionId = sessionStore.getSessionId(context, true);
Method perform
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public Object perform(final Config config, final String inputDefaultUrl, final Boolean inputRenewSession,
final String defaultClient, final FrameworkParameters parameters) {
LOGGER.debug("=== CALLBACK ===");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method saveUserProfile
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected void saveUserProfile(final CallContext ctx, final Config config, final UserProfile profile,
final boolean saveProfileInSession, final boolean multiProfile, final boolean renewSession) {
Method perform
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public Object perform(final Config config, final String inputDefaultUrl, final Boolean inputRenewSession,
final String defaultClient, final FrameworkParameters parameters) {