From 78f546568e5623bfcb7244c716f5562a85d3bdef Mon Sep 17 00:00:00 2001 From: cpprian Date: Fri, 19 Jul 2024 12:38:59 +0200 Subject: [PATCH 1/2] update mail_enrollment with information about token --- templates/mail_enrollment_start.tera | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/mail_enrollment_start.tera b/templates/mail_enrollment_start.tera index a335555992..8e9dd91b3c 100644 --- a/templates/mail_enrollment_start.tera +++ b/templates/mail_enrollment_start.tera @@ -24,6 +24,7 @@ macros::paragraph(content="1. Enrollment by desktop client"), macros::paragraph(content="Download the official defguard desktop client for macOS or Linux from the release page: " ~ release_link), macros::paragraph(content="After installation, please add a defguard instance by entering:"), macros::paragraph(content=""), +macros::paragraph(content="Please note that: the token is only valid for 24 hours after receiving this email. When the enrollment process starts user will have 10 minutes to complete the process."), macros::paragraph(content="For more details go to the desktop client documentation: " ~ client_docs_link), ] %} {{ macros::text_section(content_array=section_content)}} @@ -35,7 +36,8 @@ macros::paragraph(content="If you choose this option, you will be able to change Desktop client can still be activated later, by accessing your profile in defguard: " ~ defguard_link ~ "."), macros::paragraph(content= "If you wish to do enrollment via Web, please copy & paste the following URL in your browser: "), macros::link(content=link_url, href=link_url), -macros::paragraph(content="Or click the button below:"), +macros::paragraph(content="Please note that: this option is only valid for 24 hours after receiving this email. When the enrollment process starts user will have 10 minutes to complete the process."), +macros::paragraph(content="You can also click the button below to start the enrollment:"), ] %} {{ macros::text_section(content_array=section_content)}}

(Code::Unauthenticated, "invalid token"), + TokenError::NotFound | TokenError::SessionExpired | TokenError::TokenUsed => { + (Code::Unauthenticated, "invalid token") + } TokenError::AlreadyActive => (Code::InvalidArgument, "already active"), + TokenError::TokenExpired => (Code::Unauthenticated, "token expired"), }; Status::new(code, msg) }