On May 31, 2012 4:41 PM, "Francesco Chicchiriccò" <[email protected]>
wrote:
>
> Hi Bob,
> I've finally had chance to take a closer look at your requirements and
> was able to spend some time looking at how such requirements could be
> implemented in Syncope with as less modifications as possible.
It seems that I went a bit wild on the modification side of things ;)
I have still some remarks/questions.

> I've just fixed (you have to wait for Jenkis to deploy new artifacts)
> our standard UserController.activate() in order to be effective; here it
> goes the (fixed) flow:
>
> 1. UserController.activate() is called via REST: just be sure to call
> this method with an UserTO object where you actually put the token as
> provided by the user (UserTO.setToken()).
Ok this is what I needed, I'll change my frontend.
I find it somewhat strange to pass a userTO just for the userid and the
token. Wouldn't a simpler activate method make more sense e.g.
activate/{userid}?token=...? This is similar to the link the user gets. Or
is this against rest-principles?

> in your workflow XML. SyncopeUser.checkToken() will check if the token
> is correct and still valid.
As I explained in a previous post it makes sense to add a method to
SyncopeUser that only checks for an expired token, e.g. hasTokenExpired().
The workflow could then handle a wrong token and expired token as two
different flows. I want to delete the user with an expired token. But I'm
unable to, could you give an idea how this should be done in the Delete
class of the workflow?

>
> There is also a generic UserController.executeWorkflow() taking UserTO
> and task name as parameters for this purpose.
Ok this might be handy for my password reset flow. To be sure, an example
from the default workflow:
when the user is in "active" there are currently three paths. If I would
want to push the user to the suspend state I call the executeworkflow with
the userTO and "suspend" as taskId?

> Hope this helps.
Yes it does, thanks for your help.

Best regards
Bob

Reply via email to