protected CasCredentials retrieveCredentials(final WebContext context) throws RequiresHttpAction {
// like the SingleSignOutFilter from CAS client :
if (this.logoutHandler.isTokenRequest(context)) {
final String ticket = context.getRequestParameter(SERVICE_TICKET_PARAMETER);
this.logoutHandler.recordSession(context, ticket);
final CasCredentials casCredentials = new CasCredentials(ticket, getName());
logger.debug("casCredentials : {}", casCredentials);
return casCredentials;
} else if (this.logoutHandler.isLogoutRequest(context)) {
this.logoutHandler.destroySession(context);
final String message = "logout request : no credential returned";