@Override public void addDelegate(final CasWebflowEventResolver r, final int index) { casDelegatingWebflowEventResolver.addDelegate(r, index); } }
WebUtils.putAuthentication(authentication, context); val event = this.casDelegatingWebflowEventResolver.resolveSingle(context); if (event == null) { LOGGER.trace("Request does not indicate a requirement for authentication policy; proceed with flow normally.");
@Override protected Event doExecute(final RequestContext requestContext) { val agent = WebUtils.getHttpServletRequestUserAgentFromRequestContext(); val geoLocation = WebUtils.getHttpServletRequestGeoLocationFromRequestContext(); if (geoLocation != null && StringUtils.isNotBlank(agent) && !adaptiveAuthenticationPolicy.apply(requestContext, agent, geoLocation)) { val msg = "Adaptive authentication policy does not allow this request for " + agent + " and " + geoLocation; val map = CollectionUtils.<String, Throwable>wrap(UnauthorizedAuthenticationException.class.getSimpleName(), new UnauthorizedAuthenticationException(msg)); val error = new AuthenticationException(msg, map, new HashMap<>(0)); return new Event(this, CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE, new LocalAttributeMap<>(CasWebflowConstants.TRANSITION_ID_ERROR, error)); } val serviceTicketEvent = this.serviceTicketRequestWebflowEventResolver.resolveSingle(requestContext); if (serviceTicketEvent != null) { fireEventHooks(serviceTicketEvent, requestContext); return serviceTicketEvent; } val finalEvent = this.initialAuthenticationAttemptWebflowEventResolver.resolveSingle(requestContext); fireEventHooks(finalEvent, requestContext); return finalEvent; }
@Override public void addDelegate(final CasWebflowEventResolver r) { casDelegatingWebflowEventResolver.addDelegate(r); }