Search in sources :

Example 31 with RequestContext

use of org.springframework.webflow.execution.RequestContext in project cas by apereo.

the class BaseCasWebflowSessionContextConfiguration method verifyFlowExecutorByClient.

@Test
public void verifyFlowExecutorByClient() {
    final RequestContext ctx = getMockRequestContext();
    final LocalAttributeMap map = new LocalAttributeMap<>();
    getFlowExecutor().launchExecution("login", map, ctx.getExternalContext());
}
Also used : LocalAttributeMap(org.springframework.webflow.core.collection.LocalAttributeMap) MockRequestContext(org.springframework.webflow.test.MockRequestContext) RequestContext(org.springframework.webflow.execution.RequestContext) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Example 32 with RequestContext

use of org.springframework.webflow.execution.RequestContext in project uPortal by Jasig.

the class AttributeSwapRequestValidator method validateAttributesForm.

/**
 * Ensures all passed attributes are part of the valid query attribute set.
 */
public void validateAttributesForm(AttributeSwapRequest attributeSwapRequest, MessageContext context) {
    final RequestContext requestContext = RequestContextHolder.getRequestContext();
    final ExternalContext externalContext = requestContext.getExternalContext();
    final Set<String> swappableAttributes = this.attributeSwapperHelper.getSwappableAttributes(externalContext);
    final Map<String, Attribute> currentAttributes = attributeSwapRequest.getCurrentAttributes();
    this.checkAttributesMap(context, "currentAttributes", swappableAttributes, currentAttributes);
    final Map<String, Attribute> attributesToCopy = attributeSwapRequest.getAttributesToCopy();
    this.checkAttributesMap(context, "attributesToCopy", swappableAttributes, attributesToCopy);
}
Also used : Attribute(org.apereo.portal.portlets.Attribute) ExternalContext(org.springframework.webflow.context.ExternalContext) RequestContext(org.springframework.webflow.execution.RequestContext)

Aggregations

RequestContext (org.springframework.webflow.execution.RequestContext)32 WebUtils (org.apereo.cas.web.support.WebUtils)14 Event (org.springframework.webflow.execution.Event)14 RegisteredService (org.apereo.cas.services.RegisteredService)11 Map (java.util.Map)10 HttpServletRequest (javax.servlet.http.HttpServletRequest)10 Slf4j (lombok.extern.slf4j.Slf4j)8 Authentication (org.apereo.cas.authentication.Authentication)8 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)8 ServicesManager (org.apereo.cas.services.ServicesManager)8 Test (org.junit.Test)8 HttpServletResponse (javax.servlet.http.HttpServletResponse)7 MultifactorAuthenticationProvider (org.apereo.cas.services.MultifactorAuthenticationProvider)7 List (java.util.List)6 Set (java.util.Set)6 StringUtils (org.apache.commons.lang3.StringUtils)6 CentralAuthenticationService (org.apereo.cas.CentralAuthenticationService)6 AuthenticationServiceSelectionPlan (org.apereo.cas.authentication.AuthenticationServiceSelectionPlan)6 AuthenticationSystemSupport (org.apereo.cas.authentication.AuthenticationSystemSupport)6 MultifactorAuthenticationProviderSelector (org.apereo.cas.services.MultifactorAuthenticationProviderSelector)6