summaryrefslogtreecommitdiff
path: root/src/auth_handler/urls.rs
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2018-11-26 01:35:11 +0100
committerYves Fischer <yvesf-git@xapek.org>2018-11-26 01:35:11 +0100
commit3b89dc69da0f88cf8e2290523fa50656ac2ebb5d (patch)
tree105313b862ca7d8a123a37c279508081744a90d9 /src/auth_handler/urls.rs
downloadnginx-auth-totp-3b89dc69da0f88cf8e2290523fa50656ac2ebb5d.tar.gz
nginx-auth-totp-3b89dc69da0f88cf8e2290523fa50656ac2ebb5d.zip
Proof of concept with totp
Diffstat (limited to 'src/auth_handler/urls.rs')
-rw-r--r--src/auth_handler/urls.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/auth_handler/urls.rs b/src/auth_handler/urls.rs
new file mode 100644
index 0000000..fa7c76f
--- /dev/null
+++ b/src/auth_handler/urls.rs
@@ -0,0 +1,18 @@
+use ::router;
+
+#[derive(Clone, Copy)]
+pub(in auth_handler) enum Route {
+ Login,
+ Logout,
+ Info,
+ Check
+}
+
+pub(in auth_handler) fn create_routing_table() -> router::RoutingTable<Route> {
+ let mut r = router::RoutingTable::new();
+ r.insert("/info", Route::Info);
+ r.insert("/login", Route::Login);
+ r.insert("/logout", Route::Logout);
+ r.insert("/check", Route::Check);
+ r
+} \ No newline at end of file