-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.json
More file actions
112 lines (112 loc) · 4.91 KB
/
config.json
File metadata and controls
112 lines (112 loc) · 4.91 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
"dirs":{
"page": "example/page",
"inc": "example/inc",
"static": "example/static",
"user-data": "example/user-data",
"auth-data": "example/auth-data",
"sessions": "example/sessions",
"emails": "example/emails",
"ui": "ui/",
"ui-page": "ui/"
},
"routes": {
"/": ["redir=/auth/login", "end"],
"/auth/": ["redir=/auth/login", "end"],
"/auth/dashboard": [
"title=Dashboard@Dashboard",
["get", "try_auth=session", "idents=dashboard.idents@page", "end"],
["redir=/auth/login", "end"]
],
"/auth/login": ["title=Login or Sign Up@Login/Create Account",
["get", "form=login.json@page", "end"],
["post", "injest=login.json@page",
["form_eq=newsletter@news-or-account", [
"register", "save_form=login.json@page", "email=newsletter@emails", "redir=/auth/subscriptions", "end"]
],
["form_eq=account@news-or-account", [
["form_eq=password@auth-method", [
["form_eq=on@register", "register", "add_role=signin", "email=registration@emails", "save_form=login.json@page", "pw_set", "session_start=email-token@data",
"redir=/auth/dashboard", "end"],
["form_neq=on@register", "pw_auth", "session_start=email-token@data", "redir=/auth/dashboard", "end"]
]
],
["form_eq=send-email@auth-method",
["form_eq=on@register", "register"],
"get_token=signin", "map=brand,url@config", "set_token_url=/auth/email-sent", "email=auth-token-email@emails",
"content=email-sent.stache@page", "end"]
]
],
["form=login.json@page", "end"]
]
],
"/auth/subscriptions": [ "title=Newsletter Subscriptions@Subscriptions",
["get", "map=email,code@query", "role=subscriptions", ["query_eq=all@unsub", "unsubscribe"],
"load=subscriptions.json@page", "idents=subscriptions.idents@page", "end"],
["post", "role=subscriptions", "save_amend=subscriptions.json@page", "idents=subscriptions.idents@page", "end"],
["idents=subscriptions.idents@page", "end"]
],
"/auth/logout": [ "title=Logout@Logout",
["get", "try_auth=session", "session_close", "redir=/auth/", "end"],
["redir=/auth/login", "end"]
],
"/auth/code-login": [ "title=Token Login",
["get", "map=code,email@query", "consume_code=signin", "session_start=email-token@data", "redir=/auth/dashboard", "end"],
["post", "map=email,six-code@form", "consume_code=signin", "session_start=email-token@data", "redir=/auth/dashboard","end"],
["content=email-sent.stache@page", "end"]
],
"/not-found": ["title=Not Found", "content=not-found.html@page"],
"/no-auth": ["title=Insufficient Access", "content=no-auth.html@page"],
"/ui/api/handlers": ["api=handlers"],
"/ui/ui.css": ["content=ui.css@ui"],
"/ui/editor": ["content=editor.html@ui-page"],
"/ui/ui.js": ["content=ui.js@ui"],
"/static/style.css": ["content=style.css@static"],
"/static/form.css": ["content=form.css@ui"],
"/static/form.js": ["content=form.js@ui"],
"/error": ["title=Error", "content=error.html@page"],
"/api/handlers.json": ["get", "api=handlers"]
},
"setup": {
"page": ["nav"]
},
"perms": {
"/auth/subscriptions": [],
"/auth/login": ["no_session"],
"/auth/dashboard": ["session"],
"/auth/logout": ["session"]
},
"templates": {
"content=@page": ["content=header.stache@inc", true, "content=footer.html@inc"],
"form=@page": ["content=header.stache@inc", true, "content=footer.html@inc"],
"idents=@page": ["content=header.stache@inc", true, "content=footer.html@inc"],
"content=@ui-page": ["content=header.stache@inc", true, "content=footer.html@inc"]
},
"fields": {
"session": {
"email-token": true,
"start-time": false,
"session-token": true,
"fullname": true
},
"user": {
"fullname": true,
"salt": false,
"email-token": "unquote=email"
},
"auth": {
"email-token": true,
"password": false
}
},
"port": 3000,
"auth-socket": "example/authdigner.sock",
"sasl-socket": "example/sasldinger.sock",
"system-email": "contact@cb.local",
"brand": "Authdinger",
"url": "http://localhost:3000",
"smtp": "localhost",
"provider-key": "/basic/fixtures/bytes32.b64",
"auth-key": "/basic/fixtures/bytes32.b64",
"cache": false
}