aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-10-05 22:10:26 +0200
committerhellekin <hellekin@cepheide.org>2020-10-05 22:10:26 +0200
commit046c210e91fc03e1c670a0a28ea4849968c77056 (patch)
tree6c6437c7d9a6f252950e3ba1edc9fe12398938df /config
parentd0efb8c068a86436359b3c20950d427c7a6a27cd (diff)
downloadincommon-map-046c210e91fc03e1c670a0a28ea4849968c77056.tar.gz
Add Authentication logic
The ApplicationController provides a `current_user` method (and helper) to access the authenticated user (if any). The WelcomeController provides minimal logic to authenticate against DiscourseSSO. Current state is that one can login and logout. Views need a lot of work.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a2260d6..ac3e3f3 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,6 +1,11 @@
Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
+ root to: 'welcome#index'
+
+ get '/my/dashboard', to: 'welcome#dashboard'
+
# Discourse SSO
- get 'my/account/:token', to: 'authentication#login'
+ get 'authenticate(/:token)', to: 'welcome#authenticate'
+ get 'logout', to: 'welcome#logout'
end