summaryrefslogtreecommitdiff
path: root/data/templates/ocserv/ocserv_otp_usr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-13 22:51:33 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-13 22:51:33 +0200
commitfc36d67b051bad776a5b1d6e9a04f1205487f01f (patch)
treecde0812400ef0857d108999ff350d6582b912a49 /data/templates/ocserv/ocserv_otp_usr.tmpl
parent2b066e2cb8fe5340c3f32e4c29c75d4f3282363f (diff)
downloadvyos-1x-fc36d67b051bad776a5b1d6e9a04f1205487f01f.tar.gz
vyos-1x-fc36d67b051bad776a5b1d6e9a04f1205487f01f.zip
ocserv: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/ocserv/ocserv_otp_usr.tmpl')
-rw-r--r--data/templates/ocserv/ocserv_otp_usr.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/ocserv/ocserv_otp_usr.tmpl b/data/templates/ocserv/ocserv_otp_usr.tmpl
index fea9af5d5..18de5fec6 100644
--- a/data/templates/ocserv/ocserv_otp_usr.tmpl
+++ b/data/templates/ocserv/ocserv_otp_usr.tmpl
@@ -1,7 +1,7 @@
#<token_type> <username> <pin> <secret_hex_key> <counter> <lastpass> <time>
-{% if username is defined %}
+{% if username is vyos_defined %}
{% for user, user_config in username.items() %}
-{% if user_config.disable is not defined and user_config.otp is defined and user_config.otp is not none %}
+{% if user_config.disable is not vyos_defined and user_config.otp is vyos_defined %}
{{ user_config.otp.token_tmpl }} {{ user }} {{ user_config.otp.pin | default("-", true) }} {{ user_config.otp.key }}
{% endif %}
{% endfor %}