-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml.sample
77 lines (67 loc) · 2.05 KB
/
config.toml.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
[app]
address = "0.0.0.0:9000"
# TTL / Expiry for the OTP in seconds.
otp_ttl = 300
otp_max_attempts = 5
otp_max_resends = 3
# The root URL where the OTPGateway server is running
root_url = "http://localhost:9000"
logo_url = ""
favicon_url = ""
[auth]
# Namespaces (applications) and tokens. OTPs are generated
# under these namespaces and the OTP APIs require
# namespace + secret as BasicAuth headers for authentication.
[auth.MyApp]
namespace = "MyApp"
secret = "mySecretToken"
[auth.MyOtherApp]
namespace = "MyOtherApp"
secret = "myOtherSecretToken"
[store.redis]
host = "localhost"
port = "6379"
user = ""
password = ""
[provider.solsms]
subject = "Verification"
template = "static/sms.txt"
template_type = "text"
config = '{"APIKey": "YourSolutionsInfiniKey", "Sender": "YourID"}'
[provider.pinpoint]
subject = "Verification"
template = "static/sms.txt"
template_type = "text"
config = '''
{
"AppID": "YourAppID",
"Region": "YourRegion",
"MessageType": "TRANSACTIONAL",
"SenderID": "YourSenderID"
}
'''
[provider.smtp]
# Supported Go template tags in the 'subject' field and the template file
# {{ .To }} - The receipient's To address given to the provider (eg: e-mail address or phone)
# {{ .Namespace}} - The namespace that's passed during OTP registration
# {{ .ChannelName }} - The channel name of the provider (for eg: smtp provider's channel name is "E-mail")
# {{ .OTP }} - The generated OTP
# {{ .OTPURL }} - Direct URL to the OTP verification page for instant verification (for eg: to send in e-mails)
subject = "{{ .Namespace }}: {{ .Channel }} verification"
template = "static/smtp.tpl"
template_type = "html"
# Arbitrary configuration for provider plugins are written as JSON strings.
config = '''
{
"sHost": "you.smtp.host",
"sPort": 25,
"Host": "localhost",
"Port": 25,
"AuthProtocol": "cram",
"User": "smtp-user",
"Password": "smtp-password",
"FromEmail": "OTP verification <[email protected]>",
"MaxConns": 10,
"Sendtimeout": 5
}
'''