org.springframework.webflow.core.collection.AttributeMap Java Examples

The following examples show how to use org.springframework.webflow.core.collection.AttributeMap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TerminateWebSessionListener.java    From cas4.0.x-server-wechat with Apache License 2.0 6 votes vote down vote up
@Override
public void sessionEnded(final RequestContext context, final FlowSession session, final String outcome,
                         final AttributeMap output) {

    if ( session.isRoot() ) {
        final HttpServletRequest request = WebUtils.getHttpServletRequest(context);
        // get session but don't create it if it doesn't already exist
        final HttpSession webSession = request.getSession(false);

        if (webSession != null) {
            LOGGER.debug("Terminate web session {} in {} seconds", webSession.getId(), this.timeToDieInSeconds);
            // set the web session to die in timeToDieInSeconds
            webSession.setMaxInactiveInterval(this.timeToDieInSeconds);
        }
    }
}
 
Example #2
Source File: AddSoRPersonFlowTests.java    From openregistry with Apache License 2.0 5 votes vote down vote up
public Flow createMockAddRoleSubflow() {
    Flow mockAddRoleFlow = new Flow("add-role");
    mockAddRoleFlow.setInputMapper(new Mapper() {
        public MappingResults map(Object source, Object target) {
            assertNotNull(((AttributeMap) source).get("sorPerson"));
            return null;
        }
    });
    new EndState(mockAddRoleFlow, "roleWasAdded");
    return mockAddRoleFlow;
}
 
Example #3
Source File: GenerateMultiFactorCredentialsAction.java    From cas-mfa with Apache License 2.0 5 votes vote down vote up
@Override
protected Event doExecute(final RequestContext context) {
    final FlowSession session = context.getFlowExecutionContext().getActiveSession();
    LOGGER.debug("Authentication has entered the flow [{}] executing state [{}",
            context.getActiveFlow().getId(), session.getState().getId());
    final Credential creds = WebUtils.getCredential(context);
    final String id = creds != null ? creds.getId() : null;

    final Credential mfaCreds = createCredentials(context, creds, id);
    final AttributeMap map = new LocalAttributeMap(ATTRIBUTE_ID_MFA_CREDENTIALS, mfaCreds);
    return new Event(this, EVENT_ID_SUCCESS, map);
}
 
Example #4
Source File: CasDefaultFlowUrlHandler.java    From springboot-shiro-cas-mybatis with MIT License 4 votes vote down vote up
@Override
public String createFlowDefinitionUrl(final String flowId, final AttributeMap input, final HttpServletRequest request) {
    return request.getRequestURI()
        + (request.getQueryString() != null ? '?'
        + request.getQueryString() : "");
}
 
Example #5
Source File: CasDefaultFlowUrlHandler.java    From cas4.0.x-server-wechat with Apache License 2.0 4 votes vote down vote up
@Override
public String createFlowDefinitionUrl(final String flowId, final AttributeMap input, final HttpServletRequest request) {
    return request.getRequestURI()
        + (request.getQueryString() != null ? "?"
        + request.getQueryString() : "");
}