public void onSessionUpdate ( Request currentRequest , Session session ) { HttpServletResponse response = ( HttpServletResponse ) httpResponse . get ( ) ; storeSessionDataInCookie ( SESSION_TOKEN_KEY , session . getToken ( ) , response ) ; if ( session . getUser ( /*realm.getId()*/ ) != null ) { storeSessionDataInCookie ( USER_ID_KEY , session . getUser ( /*realm.getId()*/ ) . getId ( ) , response ) ; } else { storeSessionDataInCookie ( USER_ID_KEY , null , response ) ; } }
Notification of a session registration event .