Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
1f489a3d
Unverified
Commit
1f489a3d
authored
Mar 26, 2022
by
Manuel
Committed by
GitHub
Mar 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: handle multiple LDAP strategies (#5116)
parent
2493fd85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
auth.js
server/core/auth.js
+1
-0
users.js
server/models/users.js
+1
-1
authentication.js
server/modules/authentication/ldap/authentication.js
+1
-1
No files found.
server/core/auth.js
View file @
1f489a3d
...
...
@@ -82,6 +82,7 @@ module.exports = {
const
strategy
=
require
(
`../modules/authentication/
${
stg
.
strategyKey
}
/authentication.js`
)
stg
.
config
.
callbackURL
=
`
${
WIKI
.
config
.
host
}
/login/
${
stg
.
key
}
/callback`
stg
.
config
.
key
=
stg
.
key
;
strategy
.
init
(
passport
,
stg
.
config
)
strategy
.
config
=
stg
.
config
...
...
server/models/users.js
View file @
1f489a3d
...
...
@@ -308,7 +308,7 @@ module.exports = class User extends Model {
// Authenticate
return
new
Promise
((
resolve
,
reject
)
=>
{
WIKI
.
auth
.
passport
.
authenticate
(
selStrategy
.
strategyK
ey
,
{
WIKI
.
auth
.
passport
.
authenticate
(
selStrategy
.
k
ey
,
{
session
:
!
strInfo
.
useForm
,
scope
:
strInfo
.
scopes
?
strInfo
.
scopes
:
null
},
async
(
err
,
user
,
info
)
=>
{
...
...
server/modules/authentication/ldap/authentication.js
View file @
1f489a3d
...
...
@@ -10,7 +10,7 @@ const _ = require('lodash')
module
.
exports
=
{
init
(
passport
,
conf
)
{
passport
.
use
(
'ldap'
,
passport
.
use
(
conf
.
key
,
new
LdapStrategy
({
server
:
{
url
:
conf
.
url
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment