From a3876dfc9292cb8d96d00c045ef2bb1a517a85a5 Mon Sep 17 00:00:00 2001 From: Jason Croft Date: Mon, 9 May 2016 18:31:49 -0400 Subject: Start extending to support GitLab authentication. Add necessary dependency. Add baseURL parameter for self-hosted GitLab Add necessary require. Add block for GitLab auth. Fix typo Update font-awesome dependency for GitLab icon. Use a color closer to GitLab orange. More direct TODO --- app.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app.js') diff --git a/app.js b/app.js index bfb9ac7d..db623a51 100644 --- a/app.js +++ b/app.js @@ -292,6 +292,23 @@ if (config.github) { //github callback actions app.get('/auth/github/callback/:noteId/:action', response.githubActions); } +//gitlab auth +if (config.gitlab) { + app.get('/auth/gitlab', + passport.authenticate('gitlab'), + function (req, res) {}); + //gitlab auth callback + app.get('/auth/gitlab/callback', + passport.authenticate('gitlab', { + failureRedirect: config.serverurl + }), + function (req, res) { + res.redirect(config.serverurl); + }); + //gitlab callback actions + // TODO: Maybe in the future + //app.get('/auth/gitlab/callback/:noteId/:action', response.gitlabActions); +} //dropbox auth if (config.dropbox) { app.get('/auth/dropbox', -- cgit v1.2.3