From 046c210e91fc03e1c670a0a28ea4849968c77056 Mon Sep 17 00:00:00 2001 From: hellekin Date: Mon, 5 Oct 2020 22:10:26 +0200 Subject: 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. --- config/routes.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config') 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 -- cgit v1.2.3