summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorJason Croft2016-05-09 16:27:35 -0400
committerJason Croft2016-05-09 16:27:35 -0400
commit079822dfecfba659a491034c447c679dab2424c7 (patch)
tree9b3d327c63b49f729ae56fd40c6408e24cc81e2c /app.js
parent8e8a5e1ecb37f1464b8d7c688a220e2d1436476f (diff)
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
Diffstat (limited to 'app.js')
-rw-r--r--app.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/app.js b/app.js
index c3c824a6..a6eded98 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',