Hi guys,

I've been looking at using the generate token functionality from the workflow.

I'm not sure how to go about because the current /activate method in
the UserController doesn't take into account a token that you can pass
from the outside.
For the moment I implemented my own activation method
/activate/{userId} with a token=<token> as query parameter.

Then there are two cases in which a token might be invalid:
- not the same token passed on input, where you might want to stay in
"activate" state
- token has expired in which case you might want to delete the user object

I added a method to the SyncopeUser to catch that
public boolean hasTokenExpired() {
        return !tokenExpireTime.after(new Date());
    }

If you guys agree I can put it into JIRA as a patch?

best regards

Bob

Reply via email to