Token Validity with Event Handler

Hello,

Is it possible to use the start validity date when constructing a event handler for POST setting an end validity for a token?

For example,
If I had an event handler for +3d, and I created a token with a start validity 7 days from now. Will this token expired 10 days after the token_init event.

Currently, if I try this then the start validity will be 7 days from token_init, and the end validity will be 3 days after. Perhaps, I’m missing something like a tag like {current_time}?

Hello @quoc-axiadids

I understand the admin sets a start-period during enrollment and you want to use the event handler to set a end-period that is 7 days after the start?

This is not possible with the token-handler.

You could however fall back to the script handler to do this.

Hi @cornelinux

Thanks for your reply!
The script handler route works nicely!

Another question I have is if there is currently any way to require a tokenclass to have a validity be set at enrollment?

Hi @quoc-axiadids
No there is not the possibility to require a user to set a validity period manually - like in:
The helpdesk user has to define a valid_till time, unless the token can not be enrolled
This is not possible.

Either the admin decides freely to set a validity period
or an event handler forces a validity period to a certain time.