Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
dc4b97b8
Commit
dc4b97b8
authored
May 01, 2017
by
rithu john
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/dex/serve: add local connector directly to static connectors in storage
parent
951fb053
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
serve.go
cmd/dex/serve.go
+10
-9
No files found.
cmd/dex/serve.go
View file @
dc4b97b8
...
...
@@ -147,15 +147,6 @@ func serve(cmd *cobra.Command, args []string) error {
s
=
storage
.
WithStaticPasswords
(
s
,
passwords
)
}
if
c
.
EnablePasswordDB
{
c
.
StaticConnectors
=
append
(
c
.
StaticConnectors
,
Connector
{
ID
:
server
.
LocalConnector
,
Name
:
"Email"
,
Type
:
server
.
LocalConnector
,
})
logger
.
Infof
(
"config connector: local passwords enabled"
)
}
storageConnectors
:=
make
([]
storage
.
Connector
,
len
(
c
.
StaticConnectors
))
for
i
,
c
:=
range
c
.
StaticConnectors
{
if
c
.
ID
==
""
||
c
.
Name
==
""
||
c
.
Type
==
""
{
...
...
@@ -174,6 +165,16 @@ func serve(cmd *cobra.Command, args []string) error {
storageConnectors
[
i
]
=
conn
}
if
c
.
EnablePasswordDB
{
storageConnectors
=
append
(
storageConnectors
,
storage
.
Connector
{
ID
:
server
.
LocalConnector
,
Name
:
"Email"
,
Type
:
server
.
LocalConnector
,
})
logger
.
Infof
(
"config connector: local passwords enabled"
)
}
s
=
storage
.
WithStaticConnectors
(
s
,
storageConnectors
)
if
len
(
c
.
OAuth2
.
ResponseTypes
)
>
0
{
...
...
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