Search in sources :

Example 1 with SessionContextMgtListener

use of org.wso2.carbon.identity.application.authentication.framework.listener.SessionContextMgtListener in project carbon-identity-framework by wso2.

the class DefaultAuthenticationRequestHandler method handleSessionContextUpdate.

private void handleSessionContextUpdate(String requestType, String sessionContextKey, SessionContext sessionContext, HttpServletRequest request, HttpServletResponse response, AuthenticationContext context) {
    SessionContextMgtListener sessionContextMgtListener = FrameworkServiceDataHolder.getInstance().getSessionContextMgtListener(requestType);
    if (sessionContextMgtListener == null) {
        return;
    }
    Map<String, String> inboundProperties = sessionContextMgtListener.onPreUpdateSession(sessionContextKey, request, response, context);
    inboundProperties.forEach(sessionContext::addProperty);
}
Also used : SessionContextMgtListener(org.wso2.carbon.identity.application.authentication.framework.listener.SessionContextMgtListener)

Example 2 with SessionContextMgtListener

use of org.wso2.carbon.identity.application.authentication.framework.listener.SessionContextMgtListener in project carbon-identity-framework by wso2.

the class DefaultAuthenticationRequestHandler method handleInboundSessionCreate.

private void handleInboundSessionCreate(String requestType, String sessionContextKey, SessionContext sessionContext, HttpServletRequest request, HttpServletResponse response, AuthenticationContext context) {
    SessionContextMgtListener sessionContextMgtListener = FrameworkServiceDataHolder.getInstance().getSessionContextMgtListener(requestType);
    if (sessionContextMgtListener == null) {
        return;
    }
    Map<String, String> inboundProperties = sessionContextMgtListener.onPreCreateSession(sessionContextKey, request, response, context);
    inboundProperties.forEach(sessionContext::addProperty);
}
Also used : SessionContextMgtListener(org.wso2.carbon.identity.application.authentication.framework.listener.SessionContextMgtListener)

Aggregations

SessionContextMgtListener (org.wso2.carbon.identity.application.authentication.framework.listener.SessionContextMgtListener)2