summaryrefslogtreecommitdiff
path: root/data/templates/ocserv/ocserv_otp_usr.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/ocserv/ocserv_otp_usr.j2')
-rw-r--r--data/templates/ocserv/ocserv_otp_usr.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/data/templates/ocserv/ocserv_otp_usr.j2 b/data/templates/ocserv/ocserv_otp_usr.j2
new file mode 100644
index 000000000..b2511ed94
--- /dev/null
+++ b/data/templates/ocserv/ocserv_otp_usr.j2
@@ -0,0 +1,8 @@
+#<token_type> <username> <pin> <secret_hex_key> <counter> <lastpass> <time>
+{% if username is vyos_defined %}
+{% for user, user_config in username.items() %}
+{% 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 %}
+{% endif %}