Announcement Announcement Module
No announcement yet.
accesing userdetails from a web flow Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • accesing userdetails from a web flow

    Hi, i'm using acegi and spring web flow.
    My applicaation use a form-based login, acegi, and then if the user has been logged correctly launch a web flow.
    This web flow has a an action-state that executes a bean-action on a pojo facade. This action has the userdetails as one of its parameters.

    <action-state id="enviar">
    		<bean-action bean="enviarExpedienteFacade" method="enviarExpediente">
    				<argument expression="flowScope.expedientes"/>
    				<argument expression="flowScope.origen"/>
    				<argument expression="flowScope.destino"/>
    				<argument expression="flowScope.userDetails"/>
    		<transition on="success" to="exitoEnvio"/>
    		<transition on-exception=""
    The problem is that i can't get the user details from the sope, where is it stored??

    Currently i'm getting it from the pojo facade througth
    SecurityContextHolder.getContext().getAuthenticati on().getPrincipal();

    But i think its an intrusive way, besides its difficult to unit test.

    Any idea on how to get the userdetails from the flow will be appreciated.