summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-05-15 10:58:53 +0800
committerCheng-Han, Wu2016-05-15 10:58:53 +0800
commit22f7c4bdcb97ab9ce41fea61975783a3cf0fdb97 (patch)
treebcbf39c232748900cbdbf0c9a4b45591657bac50 /app.js
parenta70ebf77620d6c5651e092cc4998c416161746cf (diff)
parent73835763c66a1e25ee1510a4a9d52c073115a39a (diff)
Merge branch 'jccrofty30-gitlab_authentication'
Diffstat (limited to '')
-rw-r--r--app.js17
1 files changed, 17 insertions, 0 deletions
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',