diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2021-01-27 11:23:39 +0100 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2021-01-27 11:23:39 +0100 |
commit | faaee94060b63c8e3716344d1d64d66de3e8bb1c (patch) | |
tree | 35f86328b419d3a142a498ca79b29f18e8bb6925 /src/ejabberd_option.erl | |
parent | Add 'ejabberdctl foreground-quiet' (diff) |
Add oauth_cache_rest_failure_life_time option
This allows to use shorted life time for failures in rest oauth
backend than specified in oauth_cache_life_time.
Diffstat (limited to 'src/ejabberd_option.erl')
-rw-r--r-- | src/ejabberd_option.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ejabberd_option.erl b/src/ejabberd_option.erl index 873f76ed..33e9f573 100644 --- a/src/ejabberd_option.erl +++ b/src/ejabberd_option.erl @@ -83,6 +83,7 @@ -export([oauth_access/0, oauth_access/1]). -export([oauth_cache_life_time/0]). -export([oauth_cache_missed/0]). +-export([oauth_cache_rest_failure_life_time/0]). -export([oauth_cache_size/0]). -export([oauth_client_id_check/0, oauth_client_id_check/1]). -export([oauth_db_type/0]). @@ -635,6 +636,10 @@ oauth_cache_life_time() -> oauth_cache_missed() -> ejabberd_config:get_option({oauth_cache_missed, global}). +-spec oauth_cache_rest_failure_life_time() -> 'infinity' | pos_integer(). +oauth_cache_rest_failure_life_time() -> + ejabberd_config:get_option({oauth_cache_rest_failure_life_time, global}). + -spec oauth_cache_size() -> 'infinity' | pos_integer(). oauth_cache_size() -> ejabberd_config:get_option({oauth_cache_size, global}). |