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
c14b2fd5
Unverified
Commit
c14b2fd5
authored
Nov 13, 2018
by
Stephan Renatus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connector/ldap: slightly improve error output
Signed-off-by:
Stephan Renatus
<
srenatus@chef.io
>
parent
32950842
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ldap.go
connector/ldap/ldap.go
+4
-1
No files found.
connector/ldap/ldap.go
View file @
c14b2fd5
...
...
@@ -293,6 +293,9 @@ func (c *ldapConnector) do(ctx context.Context, f func(c *ldap.Conn) error) erro
// If bindDN and bindPW are empty this will default to an anonymous bind.
if
err
:=
conn
.
Bind
(
c
.
BindDN
,
c
.
BindPW
);
err
!=
nil
{
if
c
.
BindDN
==
""
&&
c
.
BindPW
==
""
{
return
fmt
.
Errorf
(
"ldap: initial anonymous bind failed: %v"
,
err
)
}
return
fmt
.
Errorf
(
"ldap: initial bind for user %q failed: %v"
,
c
.
BindDN
,
err
)
}
...
...
@@ -472,7 +475,7 @@ func (c *ldapConnector) Login(ctx context.Context, s connector.Scopes, username,
func
(
c
*
ldapConnector
)
Refresh
(
ctx
context
.
Context
,
s
connector
.
Scopes
,
ident
connector
.
Identity
)
(
connector
.
Identity
,
error
)
{
var
data
refreshData
if
err
:=
json
.
Unmarshal
(
ident
.
ConnectorData
,
&
data
);
err
!=
nil
{
return
ident
,
fmt
.
Errorf
(
"ldap: failed to un
am
rshal internal data: %v"
,
err
)
return
ident
,
fmt
.
Errorf
(
"ldap: failed to un
ma
rshal internal data: %v"
,
err
)
}
var
user
ldap
.
Entry
...
...
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