Skip to content

I'm looking for an opportunity to add a validator for tokens #18189

Discussion options

You must be logged in to vote

Custom validators aren't currently supported for tokens, as you note, because the Token model doesn't inherit CustomValidationMixin, which provides this functionality. However I see no reason it couldn't be added. You're welcome to submit a feature request citing your use case.

That said, I'd also entertain a proposal to introduce a new configuration parameter asserting a minimum expiration time for API tokens. I imagine it's a fairly common need.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ihumster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants