The AjaxAwareGatewayStorage class delegates to a CAS DefaultGatewayResolverImpl with one difference:
if the request is determined to be an ajax request, the next call to hasGatewayedAlready() will return false as the
browser will not be follow the redirect to CAS due to domain origin restrictions.