-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.example.yaml
49 lines (49 loc) · 1.44 KB
/
config.example.yaml
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
global:
# Set up a Telegram bot and link your domain to the bot.
# See https://core.telegram.org/widgets/login for more information.
bot: MyTelegramBot
token: 1234:ABCDEFG
# Listen address for the HTTP server.
address: :80
# Path prefix for auth endpoints, without trailing slash.
# You can leave it empty if it is deployed on a dedicated domain.
prefix: /auth
query:
# Query parameter of the role id for auth, required.
role: role
# Query parameter of the redirect url after auth completion, required.
redirect: redirect_uri
cookie:
# Set-Cookie name for end users, required.
name: token
# Set-Cookie path, optional.
path: /
# Set-Cookie domain, optional.
domain: example.com
auth:
# If set, the authenticated username will be added in this response header.
header: X-Telegram-Auth
# Generally speaking, tokens are only valid for this duration after issued.
duration: 12h
# But to reduce interruption from expiration,
# tokens can outlive the duration if being used continuously.
# Such tokens will be finally invalidated if unused for this timeout.
timeout: 10m
roles:
- id: owner # Passed to auth endpoints to determine authorization status.
bindings: # List of usernames assigned to this role.
- UserMe
- id: contributor
bindings:
- UserMe
- UserA
- id: 123
bindings:
- UserA
- UserB
- UserC
- id: 0
bindings:
- UserD
- UserE
- UserF