openwisp / openwisp-radius

Administration web interface and REST API for freeradius 3 build in django & python. Supports captive portal authentication, WPA Enerprise (802.1x), freeradius rlm_rest, social login, Hotspot 2.0 / 802.11u, importing users from CSV, registration of new users and more.
https://openwisp.io/docs/dev/radius/
GNU General Public License v3.0
366 stars 183 forks source link

[feature] Limit consecutive SMS tokens (backend REST API) #481

Closed nemesifier closed 1 year ago

nemesifier commented 1 year ago

We need to introduce changes to the REST API to reject new SMS from the same user before X seconds after the last SMS sent, where X is configurable.

The waiting time shall be configurable via the organization radius settings in the admin using a fallback field, I recommend a positive integer field or anything equivalent (the value must be higher than zero). The default value of the setting can be 10 seconds.

The REST API for sending a new SMS token shall return the amount of seconds that need to pass before being allowed to send another SMS in the response so that consumer knows how to make use of this information in the UI, another good reason to do so is that we do not need to duplicate this configuration setting in the consumer application.

Include translations for all languages, a translation service like Google Translate can be used for the first iteration, I will get the translations reviewed before merging.