diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-09-01 11:04:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-09-01 11:04:16 +0200 |
commit | e586a72a81ff00805df452014a36700998b5869d (patch) | |
tree | 178cb35e1838da718af6c62a528e58b6ea33f4a4 | |
parent | c3a1a4ecbea0c8df729b7a29da5d31c1f9dab9c9 (diff) | |
download | anastasis-e586a72a81ff00805df452014a36700998b5869d.tar.gz anastasis-e586a72a81ff00805df452014a36700998b5869d.zip |
work on e-mail auth
-rw-r--r-- | src/authorization/Makefile.am | 9 | ||||
-rwxr-xr-x | src/authorization/anastasis-authorization-email.sh | 2 | ||||
-rw-r--r-- | src/authorization/authorization-email-messages.json | 4 | ||||
-rw-r--r-- | src/authorization/authorization-email.conf | 11 |
4 files changed, 24 insertions, 2 deletions
diff --git a/src/authorization/Makefile.am b/src/authorization/Makefile.am index 0687129..645d6ec 100644 --- a/src/authorization/Makefile.am +++ b/src/authorization/Makefile.am | |||
@@ -1,6 +1,12 @@ | |||
1 | # This Makefile.am is in the public domain | 1 | # This Makefile.am is in the public domain |
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | 2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include |
3 | 3 | ||
4 | pkgcfgdir = $(prefix)/share/anastasis/config.d/ | ||
5 | |||
6 | pkgcfg_DATA = \ | ||
7 | authorization-email.conf | ||
8 | |||
9 | |||
4 | SUBDIRS = libanastasiseufin . | 10 | SUBDIRS = libanastasiseufin . |
5 | 11 | ||
6 | pkgcfgdir = $(prefix)/share/anastasis/config.d/ | 12 | pkgcfgdir = $(prefix)/share/anastasis/config.d/ |
@@ -26,6 +32,9 @@ endif | |||
26 | bin_PROGRAMS = \ | 32 | bin_PROGRAMS = \ |
27 | anastasis-helper-authorization-iban | 33 | anastasis-helper-authorization-iban |
28 | 34 | ||
35 | bin_SCRIPTS = \ | ||
36 | anastasis-authorization-email.sh | ||
37 | |||
29 | anastasis_helper_authorization_iban_SOURCES = \ | 38 | anastasis_helper_authorization_iban_SOURCES = \ |
30 | anastasis-helper-authorization-iban.c | 39 | anastasis-helper-authorization-iban.c |
31 | anastasis_helper_authorization_iban_LDADD = \ | 40 | anastasis_helper_authorization_iban_LDADD = \ |
diff --git a/src/authorization/anastasis-authorization-email.sh b/src/authorization/anastasis-authorization-email.sh new file mode 100755 index 0000000..ae3ecf7 --- /dev/null +++ b/src/authorization/anastasis-authorization-email.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | exec mail -s "Anastasis" -r noreply "$1" | ||
diff --git a/src/authorization/authorization-email-messages.json b/src/authorization/authorization-email-messages.json index 56f648c..5a2e048 100644 --- a/src/authorization/authorization-email-messages.json +++ b/src/authorization/authorization-email-messages.json | |||
@@ -3,8 +3,8 @@ | |||
3 | "instructions_i18n" : { | 3 | "instructions_i18n" : { |
4 | "de_DE" : "Ein Authorisierungscode wurde an %.*s@DOMAIN geschickt" | 4 | "de_DE" : "Ein Authorisierungscode wurde an %.*s@DOMAIN geschickt" |
5 | }, | 5 | }, |
6 | "body" : "Subject: Anastasis recovery code: A-%llu\n\nThis is for challenge %s.\n", | 6 | "body" : "Your Anastasis recovery code is:\nA-%llu\n\nThis is for challenge %s.\n", |
7 | "body_i18n" : { | 7 | "body_i18n" : { |
8 | "de_DE" : "Subject: Anastasis Autorisierungscode: A-%llu\n\nDies ist der Code für den Vorgang %s.\n" | 8 | "de_DE" : "Ihr Anastasis Autorisierungscode ist:\nA-%llu\n\nDies ist der Code für den Vorgang %s.\n" |
9 | } | 9 | } |
10 | } | 10 | } |
diff --git a/src/authorization/authorization-email.conf b/src/authorization/authorization-email.conf new file mode 100644 index 0000000..eb23fd4 --- /dev/null +++ b/src/authorization/authorization-email.conf | |||
@@ -0,0 +1,11 @@ | |||
1 | [authorization-email] | ||
2 | |||
3 | # Set to 'YES' to enable (must then also specify 'COST') | ||
4 | ENABLED = NO | ||
5 | |||
6 | # Set recovery cost: | ||
7 | # COST = | ||
8 | |||
9 | # Feel free to use a different command with equivalent | ||
10 | # semantics. | ||
11 | COMMAND = anastasis-authorization-mail.sh | ||