Respond to code review feedback.
1. Call HttpServletRequest#logout() on SLO callback since it is available. 2. Use final for local variables where possible.
This commit is contained in:
parent
f7343e5cb2
commit
e494ac5cf6
|
|
@ -448,7 +448,7 @@ public class CasLoginModule implements LoginModule {
|
|||
|
||||
// Remove cache entry if assertion caching is enabled
|
||||
if (this.cacheAssertions) {
|
||||
for (TicketCredential ticket : this.subject.getPrivateCredentials(TicketCredential.class)) {
|
||||
for (final TicketCredential ticket : this.subject.getPrivateCredentials(TicketCredential.class)) {
|
||||
logger.debug("Removing cached assertion for {}", ticket);
|
||||
ASSERTION_CACHE.remove(ticket);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ package org.jasig.cas.client.session;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.jasig.cas.client.util.CommonUtils;
|
||||
|
|
@ -173,7 +175,9 @@ public final class SingleSignOutHandler {
|
|||
|
||||
try {
|
||||
session.invalidate();
|
||||
// TODO: Add request.logout() upon bump to Servlet 3.0 API dependency
|
||||
request.logout();
|
||||
} catch (final ServletException e) {
|
||||
logger.debug("Error performing request.logout.");
|
||||
} catch (final IllegalStateException e) {
|
||||
logger.debug("Error invalidating session.", e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue