io.randomseed.utils.auth.locking
added in 2.0.6
Random Utilities, authentication, lock-state helpers (hard lock, soft lock, remaining wait).
*lock-wait-default*
dynamic
Default soft-lock wait duration (10 minutes). Used as fallback when auth config does not specify :locking/lock-wait.
lock-wait
(lock-wait auth-config-or-lock-wait)Returns lock wait duration from auth config map/record or explicit duration.
soft-lock-passed
(soft-lock-passed m now)Returns duration passed since soft lock until now (positive only).
soft-lock-remains
(soft-lock-remains lock-passed auth-config-or-lock-wait)(soft-lock-remains m auth-config-or-lock-wait now)Returns remaining soft-lock duration (or nil when no active soft lock).
soft-locked?
(soft-locked? lock-passed auth-config-or-lock-wait)(soft-locked? m auth-config-or-lock-wait now)Returns true when current soft-lock window has not expired.