/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final ProfileInterceptorContext interceptorContext) { if (profileRequestContext.isBrowserProfile()) { log.debug("{} Request does not have non-browser requirement, nothing to do", getLogPrefix()); return false; } return super.doPreExecute(profileRequestContext, interceptorContext); }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) { profileInterceptorContext = interceptorContextlookupStrategy.apply(profileRequestContext); if (profileInterceptorContext == null) { log.error("{} Unable to create or locate profile interceptor context", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } return doPreExecute(profileRequestContext, profileInterceptorContext) && super.doPreExecute(profileRequestContext); }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final ProfileInterceptorContext interceptorContext) { consentContext = consentContextLookupStrategy.apply(profileRequestContext); if (consentContext == null) { log.debug("{} Unable to locate consent context within profile request context", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } if (!(interceptorContext.getAttemptedFlow() instanceof ConsentFlowDescriptor)) { log.debug("{} ProfileInterceptorFlowDescriptor is not a ConsentFlowDescriptor", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } consentFlowDescriptor = (ConsentFlowDescriptor) interceptorContext.getAttemptedFlow(); return super.doPreExecute(profileRequestContext, interceptorContext); } }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final ProfileInterceptorContext interceptorContext) { consentContext = consentContextLookupStrategy.apply(profileRequestContext); if (consentContext == null) { log.debug("{} Unable to locate consent context within profile request context", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } if (!(interceptorContext.getAttemptedFlow() instanceof ConsentFlowDescriptor)) { log.debug("{} ProfileInterceptorFlowDescriptor is not a ConsentFlowDescriptor", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } consentFlowDescriptor = (ConsentFlowDescriptor) interceptorContext.getAttemptedFlow(); return super.doPreExecute(profileRequestContext, interceptorContext); } }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final ProfileInterceptorContext interceptorContext) { if (!super.doPreExecute(profileRequestContext, interceptorContext)) { return false; } results = interceptorContext.getResults(); if (results.isEmpty()) { log.debug("{} No results available from interceptor context, nothing to store", getLogPrefix()); return false; } flowDescriptor = interceptorContext.getAttemptedFlow(); if (flowDescriptor == null) { log.warn("{} No flow descriptor within interceptor context", getLogPrefix()); return false; } storageService = flowDescriptor.getStorageService(); if (storageService == null) { log.warn("{} No storage service available from interceptor flow descriptor", getLogPrefix()); return false; } return true; }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final ProfileInterceptorContext interceptorContext) { if (!super.doPreExecute(profileRequestContext, interceptorContext)) { return false; } // Detect a previous attempted flow, and move it to the intermediate collection. // This will prevent re-selecting the same flow again. if (interceptorContext.getAttemptedFlow() != null) { log.debug("{} Moving completed flow {} to completed set, selecting next one", getLogPrefix(), interceptorContext.getAttemptedFlow().getId()); interceptorContext.getAvailableFlows().remove(interceptorContext.getAttemptedFlow().getId()); interceptorContext.setAttemptedFlow(null); } return true; }