Polish SessionManagementConfigurer

This commit is contained in:
James 2020-01-31 10:56:56 +00:00 committed by Josh Cummings
parent cb9fd09150
commit ee6df1701b
No known key found for this signature in database
GPG Key ID: 49EF60DD7FF83443
1 changed files with 7 additions and 15 deletions

View File

@ -557,17 +557,13 @@ public final class SessionManagementConfigurer<H extends HttpSecurityBuilder<H>>
if (this.invalidSessionStrategy != null) {
return this.invalidSessionStrategy;
}
if (this.invalidSessionUrl != null) {
this.invalidSessionStrategy = new SimpleRedirectInvalidSessionStrategy(
this.invalidSessionUrl);
}
if (this.invalidSessionUrl == null) {
return null;
}
if (this.invalidSessionStrategy == null) {
this.invalidSessionStrategy = new SimpleRedirectInvalidSessionStrategy(
this.invalidSessionUrl);
}
return this.invalidSessionStrategy;
}
@ -580,10 +576,8 @@ public final class SessionManagementConfigurer<H extends HttpSecurityBuilder<H>>
return null;
}
if (this.expiredSessionStrategy == null) {
this.expiredSessionStrategy = new SimpleRedirectSessionInformationExpiredStrategy(
this.expiredUrl);
}
return this.expiredSessionStrategy;
}
@ -596,10 +590,8 @@ public final class SessionManagementConfigurer<H extends HttpSecurityBuilder<H>>
return null;
}
if (this.sessionAuthenticationFailureHandler == null) {
this.sessionAuthenticationFailureHandler = new SimpleUrlAuthenticationFailureHandler(
this.sessionAuthenticationErrorUrl);
}
return this.sessionAuthenticationFailureHandler;
}