Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
246
Issues
246
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
0415370f
Commit
0415370f
authored
Aug 22, 2019
by
Xavier Guimard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More REST debug
parent
47dc4936
Pipeline
#6219
passed with stage
in 13 minutes and 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
+8
-0
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/REST.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/REST.pm
+7
-0
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
View file @
0415370f
...
@@ -38,6 +38,14 @@ sub authenticate {
...
@@ -38,6 +38,14 @@ sub authenticate {
$self
->
setSecurity
(
$req
);
$self
->
setSecurity
(
$req
);
return
PE_ERROR
;
return
PE_ERROR
;
}
}
$self
->
logger
->
debug
(
"
REST result:
"
.
(
$res
->
{
result
}
||
'
undef
'
)
);
if
(
$res
->
{
info
}
)
{
eval
{
$self
->
logger
->
debug
("
$_
=>
$res
->{info}->{
$_
}
")
foreach
(
keys
%
{
$res
->
{
info
}
}
);
};
}
$self
->
logger
->
error
(
'
No "info":
'
.
$@
)
if
(
$@
);
unless
(
$res
->
{
result
}
)
{
unless
(
$res
->
{
result
}
)
{
$self
->
userLogger
->
warn
(
$self
->
userLogger
->
warn
(
"
Bad credentials for
"
.
$req
->
user
.
'
(
'
.
$req
->
address
.
'
)
'
);
"
Bad credentials for
"
.
$req
->
user
.
'
(
'
.
$req
->
address
.
'
)
'
);
...
...
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/REST.pm
View file @
0415370f
...
@@ -17,6 +17,13 @@ has ua => (
...
@@ -17,6 +17,13 @@ has ua => (
sub
restCall
{
sub
restCall
{
my
(
$self
,
$url
,
$content
)
=
@_
;
my
(
$self
,
$url
,
$content
)
=
@_
;
$self
->
logger
->
debug
("
REST: trying to call
$url
with:
");
eval
{
foreach
(
keys
%$content
)
{
$self
->
logger
->
debug
(
"
$_
:
"
.
(
/password/
?
'
****
'
:
$content
->
{
$_
}
)
);
}
};
my
$hreq
=
HTTP::
Request
->
new
(
POST
=>
$url
);
my
$hreq
=
HTTP::
Request
->
new
(
POST
=>
$url
);
$hreq
->
header
(
'
Content-Type
'
=>
'
application/json
'
);
$hreq
->
header
(
'
Content-Type
'
=>
'
application/json
'
);
$hreq
->
content
(
to_json
(
$content
)
);
$hreq
->
content
(
to_json
(
$content
)
);
...
...
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