Commit Graph

50 Commits

Author SHA1 Message Date
YusukeIwaki 6be31aba9b Remove unused imports, fixing coding style issues.
Signed-off-by: YusukeIwaki <iwaki+git@i3-systems.com>
2019-12-28 23:00:58 +09:00
YusukeIwaki d5dd27f745 Implement bitbucket login.
Signed-off-by: YusukeIwaki <iwaki+git@i3-systems.com>
2019-12-28 22:22:15 +09:00
Yukai Huang f871eff28d
Merge pull request #1327 from kamijin-fanta/github-enterprise
support to login with github enterprise
2019-11-01 10:22:46 +08:00
Ruben ten Hove 2a365d6971 fix linter issues
Signed-off-by: Ruben ten Hove <git@rhtenhove.nl>
2019-10-30 07:58:36 +01:00
rhtenhove bac3921197 Add https_proxy support to gitlab oauth
Signed-off-by: Ruben ten Hove <git@rhtenhove.nl>
2019-10-30 07:49:43 +01:00
kamijin_fanta 225e28bdbd support to login with github enterprise
Signed-off-by: kamijin_fanta <kamijin@live.jp>
2019-10-25 15:15:42 +09:00
BoHong Li 85fc41c350
Merge branch 'master' into develop 2019-08-17 00:07:49 +08:00
BoHong Li 0c9195b731
refactor: fix lint on lib/web/auth/twitter/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:30 +08:00
BoHong Li bc71b7b31b
refactor: fix lint on lib/web/auth/saml/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:29 +08:00
BoHong Li a9bcf055e7
refactor: fix lint on lib/web/auth/openid/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:29 +08:00
BoHong Li d5f5bdaa57
refactor: fix lint on lib/web/auth/oauth2/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:29 +08:00
BoHong Li 3be119ded1
refactor: fix lint on lib/web/auth/mattermost/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li d8cde49a9c
refactor: fix lint on lib/web/auth/ldap/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li df9eaf7fc4
refactor: fix lint on lib/web/auth/google/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li 41500310b0
refactor: fix lint on lib/web/auth/gitlab/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li 09f2a04bc0
refactor: fix lint on lib/web/auth/github/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:27 +08:00
BoHong Li 446d38a842
refactor: fix lint on lib/web/auth/facebook/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:27 +08:00
BoHong Li 7c8ade8258
refactor: fix lint on lib/web/auth/email/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:27 +08:00
BoHong Li ff72618a9c
refactor: fix lint on lib/web/auth/dropbox/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:26 +08:00
Max Wu 0af9bfb015
Merge branch 'master' into feature/disableRequestedAuthnContext-config-option 2019-07-31 23:35:50 +08:00
BoHong Li 8c26107ab1
fix: lint
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-15 13:36:44 +08:00
BoHong Li 6c137ae6ed
fix: mattermost has been deprecated, use mattermost-redux instead it.
1. change mattermost color and gitlab color to official color
2. Add mattermost icon because Fork-awesome/font-awesome doesn’t provide mattermost icon

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-15 13:03:31 +08:00
BoHong Li a34e6a7245
refactor: fix lint warning on lib/auth
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:35 +08:00
Sheogorath cda878d377
Add required change for Google+ API deprecation
Since Google+ is shutting down soon, we need to get the profile data
from another URL. Since the library already supports it, all we need to
do is adding a single line of code.

Details:
https://github.com/hackmdio/codimd/issues/1160

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-03-09 14:42:06 +01:00
Emmanuel Ormancey d73063922c Added a configuration option for passport-saml:
disableRequestedAuthnContext: true|false

By default only Password authmethod is accepted, this option allows any other method.

Issue and option described here:
https://github.com/bergie/passport-saml/issues/226

Signed-off-by: Emmanuel Ormancey <emmanuel.ormancey@cern.ch>
2018-12-12 10:40:24 +01:00
CloudYu 35a9f72a06 Fix typo
Signed-off-by: CloudYu <cloudyu322@gmail.com>
2018-11-27 22:14:37 +08:00
Claudius Coenen 56c043424d InternalOAuthError is not part of passport, but of passport-oauth2
This fixes part of #1056: an error while obtaining the profile
would have `502`-crashed the server.

Signed-off-by: Claudius Coenen <opensource@amenthes.de>
2018-11-14 14:38:47 +01:00
Sheogorath 9f9c4089be
Add OpenID to CodiMD
With OpenID every OpenID capable provider can provide authentication for
users of a CodiMD instance. This means we have federated
authentication.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-10-05 22:43:32 +02:00
Sheogorath 562985a115
Update passport-ldap
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-06-30 16:52:33 +02:00
Christoph (Sheogorath) Kern 551840ad57
Merge pull request #784 from pferreir/add-oauth2-support
Add "generic" OAuth2 support
2018-06-04 15:54:47 +02:00
Max Wu e0629c7d27
Fix typo of "grouptAttribute" in saml auth module
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2018-04-27 21:52:05 +08:00
Pedro Ferreira 40b3855702 Add support for generic OAuth2 providers
Signed-off-by: Pedro Ferreira <pedro.ferreira@cern.ch>
2018-03-26 15:55:39 +02:00
Sheogorath 2411dffa2c
Change config to camel case with backwards compatibility
This refactors the configs a bit to now use camel case everywhere.
This change should help to clean up the config interface and make it
better understandable.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-25 19:08:14 +02:00
Sheogorath 638eae0dfb
Add check for undefined UUID
This check is needed at there are tons of LDAP implementations out there
and none has at least one guaranteed unique field. As we currently check
three fields and added an option to select one yourself, it's still not
said that any of these fields is set. This will now create an error
and fail the authentication instead of letting people may get access to
other people's notes which are stored under a this way deterministic
wrong userid named `LDAP-undefined`.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-18 00:27:07 +01:00
Felix Schäfer 12dae4465f Multiple emails from LDAP are already an Array
Signed-off-by: Felix Schäfer <felix@thegcat.net>
2018-03-09 14:39:08 +01:00
Dustin Frisch d6ee10d176
Introduce ldap.useridField
Signed-off-by: Dustin Frisch <fooker@lab.sh>
2018-03-01 23:51:47 +01:00
Sheogorath eddf8a3a33
Fix uncaught exception for non-existent user
Since we added user management it's possible to get non-existent users
which can cause a crash of the Backend server.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-01-30 21:53:36 +01:00
Lukas Kalbertodt 612b2d1811 Add setting `ldap.usernameField`
This determines which ldap field is used as the username on
HackMD. By default, the "id" is used as username, too. The id
is taken from the fields `uidNumber`, `uid` or
`sAMAccountName`. To give the user more flexibility, they can
now choose the field used for the username instead.
2017-12-09 12:30:48 +01:00
Norihito Nakae 2db2ff484f added guide for SAML settings 2017-12-04 20:13:15 +09:00
Norihito Nakae a22be81feb fixed the SAML callback URL to unconfigurable. 2017-11-29 15:45:32 +09:00
Norihito Nakae 4a4ae9d332 Initial support for SAML authentication 2017-11-28 18:52:24 +09:00
Christoph Witzany 5cda55086a Add mattermost authentication 2017-10-31 10:34:51 +01:00
Sheogorath 881e800fd8 Merge pull request #562 from SISheogorath/fix/LDAP
Fix LDAP problem about missing uidNumber
2017-10-27 12:48:45 +02:00
Sheogorath f93a14e3e1 Fix LDAP problem about missing uidNumber
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2017-10-12 14:52:28 +02:00
Kaiyu Shi 4ae8086301 Give google the correct name. 2017-09-04 16:04:20 +08:00
Max Wu 0a6793747c fix: export to gist occurred 404 not found 2017-05-17 02:42:44 +08:00
BoHong Li ecb0533605 refactor(config.js): Extract config file
* Separate different config source to each files
* Freeze config object
2017-05-08 19:29:07 +08:00
BoHong Li a7e3c4d535 refactor(auth.js): Remove base path 2017-05-08 19:29:06 +08:00
BoHong Li d88502e331 refactor(app.js): Move passport serialize and deserialize to auth module 2017-05-08 19:29:06 +08:00
BoHong Li 69a9f7ca38 refactor(app.js, auth.js): Extract all auth method to individual modules 2017-05-08 19:24:38 +08:00