- πͺπΈSpain tunic Madrid
That's a ver interesting feature, thanks for the patch. Unfortunately, it was not handled for along time. Current development is on the branch 2.x, Drupal 10 release.
- First commit to issue fork.
- @rishabjasrotia opened merge request.
- Assigned to rishabjasrotia
- Status changed to Needs review
over 1 year ago 4:28am 14 August 2023 - Status changed to Needs work
over 1 year ago 9:31am 14 August 2023 - πͺπΈSpain tunic Madrid
I the current approach is reusing the 'created' field in the database to set there the expiration date. Honestly, I'm not fan of reusing fields. I think we should take another approach. Either add a new a database field with expiration date or rename the 'created' field to 'expiration'. In both cases, the 'expiration' date should handled to hold the date the authkey should be refreshed.
So, for nodes with no expiration this field should be empty. For nodes with expiration configured, it will set to an expiration date calculated adding expiration time (1 day, 1 week, 1 year, etc) to the current date (or creation date, it should be the same when creating an authkey). During this time span, the authkey is valid, and once the expiration time is reached the authkey is regenerated.
Given that would interesting to have the creation time we can go with the option of creating a new field.
If there's a refresh configuration, whenever a node is accessed, the expiration time is changed with the value current data + refresh time. So, if the refresh time one day the expiration date is set to tomorrow.
Also, I would improve the messages in the form. For example, "After refreshing a link, the expiration date will be extended (or shortened) by this time length." is confusing me. Extended or shortened? I would say something like "After refreshing a link, a new expiration date will be set based on the expiration extension set. For example, if expiration extension is set to 1 day, when a node is accessed using its authkey the expiration time will be set to the next day.". I think that is clearer than current message.
What do think about this?
- Issue was unassigned.
- Assigned to rishabjasrotia
- @rishabjasrotia opened merge request.