Loading request...
Proposes adding `usage` and `maxUsage` fields to `TokenInterface` to track token usage. `TokenVerifier` would increment `usage` and automatically invalidate tokens when `usage` reaches `maxUsage`, removing boilerplate code in token handling applications.
Proposed Changes: - add a usage (integer, not null) and maxUsage (integer, null) fields to TokenInterface - each call to verify of TokenVerifier should increment the usage field - each call to verify should check if maxUsage is set (not null) and if usage >= maxUsage, it should automatically invalidate the token These changes remove some boilerplate code in token handling applications (for example in the controllers in the payum bundle)