Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Master Q
lemonldap-ng
Commits
fd3b2d25
Commit
fd3b2d25
authored
Feb 24, 2021
by
Maxime Besson
Browse files
Do not remove sessions/oidc consents from Angular when the XHR fails
parent
4f599802
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-manager/site/coffee/sessions.coffee
View file @
fd3b2d25
...
...
@@ -177,11 +177,11 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
# Delete RP Consent
$scope
.
deleteOIDCConsent
=
(
rp
,
epoch
)
->
items
=
document
.
querySelectorAll
(
".data-
#{
epoch
}
"
)
for
e
in
items
e
.
remove
()
$scope
.
waiting
=
true
$http
[
'delete'
](
"
#{
scriptname
}
sessions/OIDCConsent/
#{
sessionType
}
/
#{
$scope
.
currentSession
.
id
}
?rp=
#{
rp
}
&epoch=
#{
epoch
}
"
).
then
(
response
)
->
$scope
.
waiting
=
false
for
e
in
items
e
.
remove
()
,
(
resp
)
->
$scope
.
waiting
=
false
$scope
.
showT
=
false
...
...
@@ -194,8 +194,6 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
$scope
.
currentScope
.
remove
()
$scope
.
waiting
=
false
,
(
resp
)
->
$scope
.
currentSession
=
null
$scope
.
currentScope
.
remove
()
$scope
.
waiting
=
false
# Open node
...
...
lemonldap-ng-manager/site/htdocs/static/js/sessions.js
View file @
fd3b2d25
...
...
@@ -194,15 +194,18 @@
return
$scope
.
showM
=
false
;
};
$scope
.
deleteOIDCConsent
=
function
(
rp
,
epoch
)
{
var
e
,
i
,
items
,
len
;
var
items
;
items
=
document
.
querySelectorAll
(
"
.data-
"
+
epoch
);
for
(
i
=
0
,
len
=
items
.
length
;
i
<
len
;
i
++
)
{
e
=
items
[
i
];
e
.
remove
();
}
$scope
.
waiting
=
true
;
$http
[
'
delete
'
](
scriptname
+
"
sessions/OIDCConsent/
"
+
sessionType
+
"
/
"
+
$scope
.
currentSession
.
id
+
"
?rp=
"
+
rp
+
"
&epoch=
"
+
epoch
).
then
(
function
(
response
)
{
return
$scope
.
waiting
=
false
;
var
e
,
i
,
len
,
results
;
$scope
.
waiting
=
false
;
results
=
[];
for
(
i
=
0
,
len
=
items
.
length
;
i
<
len
;
i
++
)
{
e
=
items
[
i
];
results
.
push
(
e
.
remove
());
}
return
results
;
},
function
(
resp
)
{
return
$scope
.
waiting
=
false
;
});
...
...
@@ -215,8 +218,6 @@
$scope
.
currentScope
.
remove
();
return
$scope
.
waiting
=
false
;
},
function
(
resp
)
{
$scope
.
currentSession
=
null
;
$scope
.
currentScope
.
remove
();
return
$scope
.
waiting
=
false
;
});
};
...
...
lemonldap-ng-manager/site/htdocs/static/js/sessions.min.js
View file @
fd3b2d25
(
function
(){
var
M
,
r
,
h
,
_
;
_
=
{
_whatToTrace
:[
function
(
e
,
t
){
return
"
groupBy=substr(
"
+
e
+
"
,1)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=
"
+
e
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
}],
ipAddr
:[
function
(
e
,
t
){
return
"
groupBy=net(
"
+
e
+
"
,16,1)
"
},
function
(
e
,
t
){
return
t
.
match
(
/:/
)
||
(
t
+=
"
.
"
),
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,32,2)
"
},
function
(
e
,
t
){
return
t
.
match
(
/:/
)
||
(
t
+=
"
.
"
),
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,48,3)
"
},
function
(
e
,
t
){
return
t
.
match
(
/:/
)
||
(
t
+=
"
.
"
),
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,128,4)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
&groupBy=_whatToTrace
"
},
function
(
e
,
t
,
n
){
return
n
.
replace
(
/
\&
groupBy.*$/
,
""
)
+
"
&_whatToTrace=
"
+
t
}],
_startTime
:[
function
(
e
,
t
){
return
"
groupBy=substr(
"
+
e
+
"
,8)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,10)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,11)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,12)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=_whatToTrace
"
},
function
(
e
,
t
,
n
){
return
console
.
log
(
e
),
console
.
log
(
t
),
console
.
log
(
n
),
n
.
replace
(
/
\&
groupBy.*$/
,
""
)
+
"
&_whatToTrace=
"
+
t
}],
doubleIp
:[
function
(
e
,
t
){
return
e
},
function
(
e
,
t
){
return
"
_whatToTrace=
"
+
t
+
"
&groupBy=ipAddr
"
},
function
(
e
,
t
,
n
){
return
n
.
replace
(
/
\&
groupBy.*$/
,
""
)
+
"
&ipAddr=
"
+
t
}],
_session_uid
:[
function
(
e
,
t
){
return
"
groupBy=substr(
"
+
e
+
"
,1)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=
"
+
e
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
}]},
h
=
{
_whatToTrace
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
1
===
n
&&
t
.
length
>
o
?
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,
"
+
(
n
+
o
+
1
)
+
"
)
"
:
null
},
ipAddr
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
0
<
n
&&
n
<
4
&&!
t
.
match
(
/^
\d
+
\.\d
/
)
&&
o
<
2
?
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,
"
+
(
16
*
n
+
4
*
(
o
+
1
))
+
"
,
"
+
(
1
+
n
+
o
)
+
"
)
"
:
null
},
_startTime
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
3
<
n
?
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,
"
+
(
10
+
n
+
o
)
+
"
)
"
:
null
},
_session_uid
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
1
===
n
&&
t
.
length
>
o
?
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,
"
+
(
n
+
o
+
1
)
+
"
)
"
:
null
}},
M
=
{
dateTitle
:[
"
_utime
"
,
"
_startTime
"
,
"
_updateTime
"
,
"
_lastAuthnUTime
"
,
"
_lastSeen
"
],
connectionTitle
:[
"
ipAddr
"
,
"
_timezone
"
,
"
_url
"
],
authenticationTitle
:[
"
_session_id
"
,
"
_user
"
,
"
_password
"
,
"
authenticationLevel
"
],
modulesTitle
:[
"
_auth
"
,
"
_userDB
"
,
"
_passwordDB
"
,
"
_issuerDB
"
,
"
_authChoice
"
,
"
_authMulti
"
,
"
_userDBMulti
"
],
saml
:[
"
_idp
"
,
"
_idpConfKey
"
,
"
_samlToken
"
,
"
_lassoSessionDump
"
,
"
_lassoIdentityDump
"
],
groups
:[
"
groups
"
,
"
hGroups
"
],
ldap
:[
"
dn
"
],
BrowserID
:[
"
_browserIdAnswer
"
,
"
_browserIdAnswerRaw
"
],
OpenIDConnect
:[
"
_oidc_id_token
"
,
"
_oidc_OP
"
,
"
_oidc_access_token
"
],
sfaTitle
:[
"
_2fDevices
"
],
oidcConsents
:[
"
_oidcConsents
"
]},
r
=
{
session
:[{
title
:
"
deleteSession
"
,
icon
:
"
trash
"
}],
home
:[]},
angular
.
module
(
"
llngSessionsExplorer
"
,[
"
ui.tree
"
,
"
ui.bootstrap
"
,
"
llApp
"
]).
controller
(
"
SessionsExplorerCtrl
"
,[
"
$scope
"
,
"
$translator
"
,
"
$location
"
,
"
$q
"
,
"
$http
"
,
function
(
H
,
t
,
i
,
e
,
d
){
var
f
,
n
,
o
,
g
;
return
H
.
links
=
links
,
H
.
menulinks
=
menulinks
,
H
.
staticPrefix
=
staticPrefix
,
H
.
scriptname
=
scriptname
,
H
.
formPrefix
=
formPrefix
,
H
.
impPrefix
=
impPrefix
,
H
.
sessionTTL
=
sessionTTL
,
H
.
availableLanguages
=
availableLanguages
,
H
.
waiting
=!
0
,
H
.
showM
=!
1
,
H
.
showT
=!
0
,
H
.
data
=
[],
H
.
currentScope
=
null
,
H
.
currentSession
=
null
,
H
.
menu
=
r
,
H
.
translateP
=
t
.
translateP
,
H
.
translate
=
t
.
translate
,
H
.
translateTitle
=
function
(
e
){
return
t
.
translateField
(
e
,
"
title
"
)},
g
=
"
global
"
,
H
.
menuClick
=
function
(
e
){
if
(
e
.
popup
)
window
.
open
(
e
.
popup
);
else
switch
(
e
.
action
||
(
e
.
action
=
e
.
title
),
typeof
e
.
action
){
case
"
function
"
:
e
.
action
(
H
.
currentNode
,
H
);
break
;
case
"
string
"
:
H
[
e
.
action
]();
break
;
default
:
console
.
log
(
typeof
e
.
action
)}
return
H
.
showM
=!
1
},
H
.
deleteOIDCConsent
=
function
(
e
,
t
){
var
n
,
o
,
r
;
for
(
n
=
0
,
r
=
(
o
=
document
.
querySelectorAll
(
"
.data-
"
+
t
)).
length
;
n
<
r
;
n
++
)
o
[
n
].
remove
();
return
H
.
waiting
=!
0
,
d
.
delete
(
scriptname
+
"
sessions/OIDCConsent/
"
+
g
+
"
/
"
+
H
.
currentSession
.
id
+
"
?rp=
"
+
e
+
"
&epoch=
"
+
t
).
then
(
function
(
e
){
return
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
waiting
=!
1
}),
H
.
showT
=!
1
},
H
.
deleteSession
=
function
(){
return
H
.
waiting
=!
0
,
d
.
delete
(
scriptname
+
"
sessions/
"
+
g
+
"
/
"
+
H
.
currentSession
.
id
).
then
(
function
(
e
){
return
H
.
currentSession
=
null
,
H
.
currentScope
.
remove
(),
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
currentSession
=
null
,
H
.
currentScope
.
remove
(),
H
.
waiting
=!
1
})},
H
.
stoggle
=
function
(
e
){
var
t
;
return
0
===
(
t
=
e
.
$modelValue
).
nodes
.
length
&&
H
.
updateTree
(
t
.
value
,
t
.
nodes
,
t
.
level
,
t
.
over
,
t
.
query
,
t
.
count
),
e
.
toggle
()},
H
.
displaySession
=
function
(
e
){
var
t
,
n
;
return
n
=
function
(
s
){
var
e
,
t
,
n
,
o
,
r
,
i
,
l
,
u
,
a
,
c
,
p
,
d
,
f
,
g
,
h
,
_
,
m
,
y
,
T
,
w
,
v
,
S
,
$
,
B
,
b
,
D
,
L
,
A
,
P
,
x
,
C
,
I
,
k
,
R
,
O
,
E
;
for
(
d
in
e
=
function
(
e
,
t
){
var
n
,
o
,
r
,
i
;
for
(
n
in
r
=
[],
o
=
new
RegExp
(
e
),
s
)
i
=
s
[
n
],
n
.
match
(
o
)
&&
i
&&
(
r
.
push
({
title
:
n
,
value
:
i
}),
delete
s
[
n
]);
if
(
0
<
r
.
length
)
return
A
.
push
({
title
:
t
,
nodes
:
r
})},
k
=
s
.
_utime
,
s
)(
E
=
s
[
d
])?(
"
string
"
==
typeof
s
&&
E
.
match
(
/; /
)
&&
(
s
[
d
]
=
E
.
split
(
"
;
"
)),
"
object
"
!=
typeof
s
[
d
]
&&
(
"
_password
"
.
match
(
new
RegExp
(
"
\
b
"
+
d
+
"
\
b
"
))?
s
[
d
]
=
"
********
"
:
d
.
match
(
/^
(
_utime|_lastAuthnUTime|_lastSeen|notification
)
$/
)?
s
[
d
]
=
H
.
localeDate
(
E
):
d
.
match
(
/^
(
_startTime|_updateTime
)
$/
)
&&
(
s
[
d
]
=
H
.
strToLocaleDate
(
E
)))):
delete
s
[
d
];
for
(
r
in
A
=
[],
M
){
for
(
C
=
[],
a
=
0
,
g
=
(
o
=
M
[
r
]).
length
;
a
<
g
;
a
++
)
if
(
n
=
o
[
a
],
s
[
n
])
if
(
s
[
n
].
toString
().
match
(
/"type":
\s
*"
(?:
TOTP|U2F|UBK
)
"/
)){
for
(
C
.
push
({
title
:
"
type
"
,
value
:
"
name
"
,
epoch
:
"
date
"
,
td
:
"
0
"
}),
c
=
0
,
h
=
(
t
=
JSON
.
parse
(
s
[
n
])).
length
;
c
<
h
;
c
++
){
for
(
d
in
P
=
t
[
c
])
E
=
P
[
d
],
"
type
"
===
d
&&
(
R
=
E
),
"
name
"
===
d
&&
(
v
=
E
),
"
epoch
"
===
d
&&
(
u
=
E
);
C
.
push
({
title
:
R
,
value
:
v
,
epoch
:
u
,
td
:
"
1
"
})}
delete
s
[
n
]}
else
if
(
s
[
n
].
toString
().
match
(
/"rp":
\s
*"
[\w
-
]
+"/
)){
for
(
C
.
push
({
title
:
"
RP
"
,
value
:
"
scope
"
,
epoch
:
"
date
"
,
td
:
"
0
"
}),
p
=
0
,
_
=
(
t
=
JSON
.
parse
(
s
[
n
])).
length
;
p
<
_
;
p
++
){
for
(
d
in
$
=
t
[
p
])
E
=
$
[
d
],
"
rp
"
===
d
&&
(
R
=
E
),
"
scope
"
===
d
&&
(
v
=
E
),
"
epoch
"
===
d
&&
(
u
=
E
);
C
.
push
({
title
:
R
,
value
:
v
,
epoch
:
u
,
td
:
"
2
"
})}
delete
s
[
n
]}
else
s
[
n
].
toString
().
match
(
/
\w
+/
)
&&
C
.
push
({
title
:
n
,
value
:
s
[
n
],
epoch
:
""
}),
delete
s
[
n
];
else
delete
s
[
n
];
0
<
C
.
length
&&
A
.
push
({
title
:
"
__
"
+
r
+
"
__
"
,
nodes
:
C
})}
if
(
e
(
"
^openid
"
,
"
OpenID
"
),
e
(
"
^notification_(.+)
"
,
"
__notificationsDone__
"
),
s
.
_loginHistory
){
if
(
O
=
[],
s
.
_loginHistory
.
successLogin
)
for
(
w
=
0
,
m
=
(
D
=
s
.
_loginHistory
.
successLogin
).
length
;
w
<
m
;
w
++
){
for
(
d
in
i
=
""
,
f
=
D
[
w
])
E
=
f
[
d
],
d
.
match
(
/^
(
_utime|ipAddr|error
)
$/
)
||
(
i
+=
"
,
"
+
d
+
"
:
"
+
E
);(
I
=
i
.
split
(
"
,
"
)).
sort
(),
i
=
I
.
join
(
"
,
"
),
O
.
push
({
t
:
f
.
_utime
,
title
:
H
.
localeDate
(
f
.
_utime
),
value
:
"
Success (IP
"
+
f
.
ipAddr
+
"
)
"
+
i
})}
if
(
s
.
_loginHistory
.
failedLogin
)
for
(
S
=
0
,
y
=
(
L
=
s
.
_loginHistory
.
failedLogin
).
length
;
S
<
y
;
S
++
){
for
(
d
in
i
=
""
,
f
=
L
[
S
])
E
=
f
[
d
],
d
.
match
(
/^
(
_utime|ipAddr|error
)
$/
)
||
(
i
+=
"
,
"
+
d
+
"
:
"
+
E
);(
I
=
i
.
split
(
"
,
"
)).
sort
(),
i
=
I
.
join
(
"
,
"
),
O
.
push
({
t
:
f
.
_utime
,
title
:
H
.
localeDate
(
f
.
_utime
),
value
:
"
Error
"
+
f
.
error
+
"
(IP
"
+
f
.
ipAddr
+
"
)
"
+
i
})}
delete
s
.
_loginHistory
,
O
.
sort
(
function
(
e
,
t
){
return
t
.
t
-
e
.
t
}),
A
.
push
({
title
:
"
__loginHistory__
"
,
nodes
:
O
})}
for
(
d
in
O
=
[],
s
)
E
=
s
[
d
],
O
.
push
({
title
:
d
,
value
:
E
});
for
(
O
.
sort
(
function
(
e
,
t
){
return
e
.
title
>
t
.
title
?
1
:
e
.
title
<
t
.
title
?
-
1
:
0
}),
b
=
[],
x
=
[],
B
=
0
,
T
=
O
.
length
;
B
<
T
;
B
++
)(
l
=
O
[
B
]).
title
.
match
(
new
RegExp
(
"
^
"
+
H
.
impPrefix
+
"
.+$
"
))?(
console
.
log
(
l
,
"
-> real attribute
"
),
b
.
push
(
l
)):
x
.
push
(
l
);
return
O
=
x
.
concat
(
b
),
A
.
push
({
title
:
"
__attributesAndMacros__
"
,
nodes
:
O
}),{
_utime
:
k
,
nodes
:
A
}},
H
.
currentScope
=
e
,
t
=
e
.
$modelValue
.
session
,
d
.
get
(
scriptname
+
"
sessions/
"
+
g
+
"
/
"
+
t
).
then
(
function
(
e
){
return
H
.
currentSession
=
n
(
e
.
data
),
H
.
currentSession
.
id
=
t
}),
H
.
showT
=!
1
},
H
.
localeDate
=
function
(
e
){
return
new
Date
(
1
e3
*
e
).
toLocaleString
()},
H
.
isValid
=
function
(
e
,
t
){
var
n
,
o
,
r
;
return
r
=
i
.
path
(),
o
=
Date
.
now
()
/
1
e3
,
console
.
log
(
"
Path
"
,
r
),
console
.
log
(
"
Session epoch
"
,
e
),
console
.
log
(
"
Current date
"
,
o
),
console
.
log
(
"
Session TTL
"
,
sessionTTL
),
n
=
o
-
e
<
sessionTTL
||
i
.
path
().
match
(
/^
\/
persistent/
),
"
msg
"
===
t
?(
console
.
log
(
"
Return msg
"
),
n
?
"
info
"
:
"
warning
"
):
"
style
"
===
t
?(
console
.
log
(
"
Return style
"
),
n
?{}:{
color
:
"
#627990
"
,
"
font-style
"
:
"
italic
"
}):(
console
.
log
(
"
Return isValid
"
),
n
)},
H
.
strToLocaleDate
=
function
(
e
){
var
t
;
return
(
t
=
e
.
match
(
/^
(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})
$/
)).
length
?
new
Date
(
t
[
1
]
+
"
-
"
+
t
[
2
]
+
"
-
"
+
t
[
3
]
+
"
T
"
+
t
[
4
]
+
"
:
"
+
t
[
5
]
+
"
:
"
+
t
[
6
]).
toLocaleString
():
e
},
H
.
getLanguage
=
function
(
e
){
return
H
.
lang
=
e
,
H
.
form
=
"
white
"
,
H
.
init
(),
H
.
showM
=!
1
},
o
=
function
(
e
,
t
,
n
){
var
o
;
return
o
=
t
.
match
(
/#!
?\/(\w
+
)
/
),
g
=
"
global
"
,
null
===
o
?
H
.
type
=
"
_whatToTrace
"
:
o
[
1
].
match
(
/^
(
persistent|offline
)
$/
)?(
g
=
RegExp
.
$1
,
H
.
type
=
"
_session_uid
"
):
H
.
type
=
o
[
1
],
H
.
init
()},
H
.
$on
(
"
$locationChangeSuccess
"
,
o
),
f
=
0
,
H
.
updateTree
=
function
(
s
,
l
,
u
,
a
,
e
,
t
){
var
c
,
p
,
n
;
if
(
H
.
waiting
=!
0
,
p
=
_
[
H
.
type
]?
_
[
H
.
type
]:
"
_updateTime
"
===
H
.
type
?
_
.
_startTime
:
_
.
_whatToTrace
,
c
=
p
[
u
](
H
.
type
,
s
,
e
),
25
<
t
&&
h
[
H
.
type
]
&&
(
n
=
h
[
H
.
type
](
H
.
type
,
s
,
u
,
a
,
e
))?(
a
++
,
c
=
n
,
u
-=
1
):
a
=
0
,
d
.
get
(
scriptname
+
"
sessions/
"
+
g
+
"
?
"
+
c
).
then
(
function
(
e
){
var
t
,
n
,
o
,
r
,
i
;
if
((
t
=
e
.
data
).
result
){
for
(
n
=
0
,
o
=
(
i
=
t
.
values
).
length
;
n
<
o
;
n
++
)
r
=
i
[
n
],
f
++
,
r
.
id
=
"
node
"
+
f
,
u
<
p
.
length
-
1
&&
(
r
.
nodes
=
[],
r
.
level
=
u
+
1
,
r
.
query
=
c
,
r
.
over
=
a
,
H
.
type
.
match
(
/^
(?:
start|update
)
Time$/
)
&&
(
r
.
title
=
r
.
value
.
replace
(
/^
(\d{8})(\d{2})(\d{2})
$/
,
"
$2:$3
"
).
replace
(
/^
(\d{8})(\d{2})(\d)
$/
,
"
$2:$30
"
).
replace
(
/^
(\d{8})(\d{2})
$/
,
"
$2h
"
).
replace
(
/^
(\d{4})(\d{2})(\d{2})
/
,
"
$1-$2-$3
"
))),
l
.
push
(
r
);
""
===
s
&&
(
H
.
total
=
t
.
total
)}
return
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
waiting
=!
1
}),
console
.
log
(
"
Selection
"
,
g
),
H
.
navssoStyle
=
{
color
:
"
#777
"
},
H
.
offlineStyle
=
{
color
:
"
#777
"
},
H
.
persistentStyle
=
{
color
:
"
#777
"
},
"
global
"
===
g
&&
(
H
.
navssoStyle
=
{
color
:
"
#333
"
}),
"
offline
"
===
g
&&
(
H
.
offlineStyle
=
{
color
:
"
#333
"
}),
"
persistent
"
===
g
)
return
H
.
persistentStyle
=
{
color
:
"
#333
"
}},
H
.
init
=
function
(){
return
H
.
waiting
=!
0
,
H
.
data
=
[],
H
.
currentScope
=
null
,
H
.
currentSession
=
null
,
e
.
all
([
t
.
init
(
H
.
lang
),
H
.
updateTree
(
""
,
H
.
data
,
0
,
0
)]).
then
(
function
(){
return
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
waiting
=!
1
}),
H
.
activeModule
=
"
sessions
"
,
H
.
myStyle
=
{
color
:
"
#ffb84d
"
}},
n
=
i
.
path
().
match
(
/^
\/(\w
+
)
/
),
H
.
type
=
n
?
n
[
1
]:
"
_whatToTrace
"
}])}).
call
(
this
);
\ No newline at end of file
(
function
(){
var
M
,
s
,
g
,
h
;
h
=
{
_whatToTrace
:[
function
(
e
,
t
){
return
"
groupBy=substr(
"
+
e
+
"
,1)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=
"
+
e
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
}],
ipAddr
:[
function
(
e
,
t
){
return
"
groupBy=net(
"
+
e
+
"
,16,1)
"
},
function
(
e
,
t
){
return
t
.
match
(
/:/
)
||
(
t
+=
"
.
"
),
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,32,2)
"
},
function
(
e
,
t
){
return
t
.
match
(
/:/
)
||
(
t
+=
"
.
"
),
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,48,3)
"
},
function
(
e
,
t
){
return
t
.
match
(
/:/
)
||
(
t
+=
"
.
"
),
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,128,4)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
&groupBy=_whatToTrace
"
},
function
(
e
,
t
,
n
){
return
n
.
replace
(
/
\&
groupBy.*$/
,
""
)
+
"
&_whatToTrace=
"
+
t
}],
_startTime
:[
function
(
e
,
t
){
return
"
groupBy=substr(
"
+
e
+
"
,8)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,10)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,11)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,12)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=_whatToTrace
"
},
function
(
e
,
t
,
n
){
return
console
.
log
(
e
),
console
.
log
(
t
),
console
.
log
(
n
),
n
.
replace
(
/
\&
groupBy.*$/
,
""
)
+
"
&_whatToTrace=
"
+
t
}],
doubleIp
:[
function
(
e
,
t
){
return
e
},
function
(
e
,
t
){
return
"
_whatToTrace=
"
+
t
+
"
&groupBy=ipAddr
"
},
function
(
e
,
t
,
n
){
return
n
.
replace
(
/
\&
groupBy.*$/
,
""
)
+
"
&ipAddr=
"
+
t
}],
_session_uid
:[
function
(
e
,
t
){
return
"
groupBy=substr(
"
+
e
+
"
,1)
"
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
+
"
*&groupBy=
"
+
e
},
function
(
e
,
t
){
return
e
+
"
=
"
+
t
}]},
g
=
{
_whatToTrace
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
1
===
n
&&
t
.
length
>
o
?
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,
"
+
(
n
+
o
+
1
)
+
"
)
"
:
null
},
ipAddr
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
0
<
n
&&
n
<
4
&&!
t
.
match
(
/^
\d
+
\.\d
/
)
&&
o
<
2
?
e
+
"
=
"
+
t
+
"
*&groupBy=net(
"
+
e
+
"
,
"
+
(
16
*
n
+
4
*
(
o
+
1
))
+
"
,
"
+
(
1
+
n
+
o
)
+
"
)
"
:
null
},
_startTime
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
3
<
n
?
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,
"
+
(
10
+
n
+
o
)
+
"
)
"
:
null
},
_session_uid
:
function
(
e
,
t
,
n
,
o
){
return
console
.
log
(
"
overScheme => level
"
,
n
,
"
over
"
,
o
),
1
===
n
&&
t
.
length
>
o
?
e
+
"
=
"
+
t
+
"
*&groupBy=substr(
"
+
e
+
"
,
"
+
(
n
+
o
+
1
)
+
"
)
"
:
null
}},
M
=
{
dateTitle
:[
"
_utime
"
,
"
_startTime
"
,
"
_updateTime
"
,
"
_lastAuthnUTime
"
,
"
_lastSeen
"
],
connectionTitle
:[
"
ipAddr
"
,
"
_timezone
"
,
"
_url
"
],
authenticationTitle
:[
"
_session_id
"
,
"
_user
"
,
"
_password
"
,
"
authenticationLevel
"
],
modulesTitle
:[
"
_auth
"
,
"
_userDB
"
,
"
_passwordDB
"
,
"
_issuerDB
"
,
"
_authChoice
"
,
"
_authMulti
"
,
"
_userDBMulti
"
],
saml
:[
"
_idp
"
,
"
_idpConfKey
"
,
"
_samlToken
"
,
"
_lassoSessionDump
"
,
"
_lassoIdentityDump
"
],
groups
:[
"
groups
"
,
"
hGroups
"
],
ldap
:[
"
dn
"
],
BrowserID
:[
"
_browserIdAnswer
"
,
"
_browserIdAnswerRaw
"
],
OpenIDConnect
:[
"
_oidc_id_token
"
,
"
_oidc_OP
"
,
"
_oidc_access_token
"
],
sfaTitle
:[
"
_2fDevices
"
],
oidcConsents
:[
"
_oidcConsents
"
]},
s
=
{
session
:[{
title
:
"
deleteSession
"
,
icon
:
"
trash
"
}],
home
:[]},
angular
.
module
(
"
llngSessionsExplorer
"
,[
"
ui.tree
"
,
"
ui.bootstrap
"
,
"
llApp
"
]).
controller
(
"
SessionsExplorerCtrl
"
,[
"
$scope
"
,
"
$translator
"
,
"
$location
"
,
"
$q
"
,
"
$http
"
,
function
(
H
,
t
,
i
,
e
,
o
){
var
d
,
n
,
r
,
f
;
return
H
.
links
=
links
,
H
.
menulinks
=
menulinks
,
H
.
staticPrefix
=
staticPrefix
,
H
.
scriptname
=
scriptname
,
H
.
formPrefix
=
formPrefix
,
H
.
impPrefix
=
impPrefix
,
H
.
sessionTTL
=
sessionTTL
,
H
.
availableLanguages
=
availableLanguages
,
H
.
waiting
=!
0
,
H
.
showM
=!
1
,
H
.
showT
=!
0
,
H
.
data
=
[],
H
.
currentScope
=
null
,
H
.
currentSession
=
null
,
H
.
menu
=
s
,
H
.
translateP
=
t
.
translateP
,
H
.
translate
=
t
.
translate
,
H
.
translateTitle
=
function
(
e
){
return
t
.
translateField
(
e
,
"
title
"
)},
f
=
"
global
"
,
H
.
menuClick
=
function
(
e
){
if
(
e
.
popup
)
window
.
open
(
e
.
popup
);
else
switch
(
e
.
action
||
(
e
.
action
=
e
.
title
),
typeof
e
.
action
){
case
"
function
"
:
e
.
action
(
H
.
currentNode
,
H
);
break
;
case
"
string
"
:
H
[
e
.
action
]();
break
;
default
:
console
.
log
(
typeof
e
.
action
)}
return
H
.
showM
=!
1
},
H
.
deleteOIDCConsent
=
function
(
e
,
t
){
var
i
;
return
i
=
document
.
querySelectorAll
(
"
.data-
"
+
t
),
H
.
waiting
=!
0
,
o
.
delete
(
scriptname
+
"
sessions/OIDCConsent/
"
+
f
+
"
/
"
+
H
.
currentSession
.
id
+
"
?rp=
"
+
e
+
"
&epoch=
"
+
t
).
then
(
function
(
e
){
var
t
,
n
,
o
,
r
;
for
(
H
.
waiting
=!
1
,
r
=
[],
n
=
0
,
o
=
i
.
length
;
n
<
o
;
n
++
)
t
=
i
[
n
],
r
.
push
(
t
.
remove
());
return
r
},
function
(
e
){
return
H
.
waiting
=!
1
}),
H
.
showT
=!
1
},
H
.
deleteSession
=
function
(){
return
H
.
waiting
=!
0
,
o
.
delete
(
scriptname
+
"
sessions/
"
+
f
+
"
/
"
+
H
.
currentSession
.
id
).
then
(
function
(
e
){
return
H
.
currentSession
=
null
,
H
.
currentScope
.
remove
(),
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
waiting
=!
1
})},
H
.
stoggle
=
function
(
e
){
var
t
;
return
0
===
(
t
=
e
.
$modelValue
).
nodes
.
length
&&
H
.
updateTree
(
t
.
value
,
t
.
nodes
,
t
.
level
,
t
.
over
,
t
.
query
,
t
.
count
),
e
.
toggle
()},
H
.
displaySession
=
function
(
e
){
var
t
,
n
;
return
n
=
function
(
s
){
var
e
,
t
,
n
,
o
,
r
,
i
,
l
,
u
,
a
,
c
,
p
,
d
,
f
,
g
,
h
,
_
,
m
,
y
,
T
,
w
,
v
,
S
,
$
,
B
,
b
,
D
,
L
,
A
,
P
,
x
,
C
,
I
,
k
,
R
,
O
,
E
;
for
(
d
in
e
=
function
(
e
,
t
){
var
n
,
o
,
r
,
i
;
for
(
n
in
r
=
[],
o
=
new
RegExp
(
e
),
s
)
i
=
s
[
n
],
n
.
match
(
o
)
&&
i
&&
(
r
.
push
({
title
:
n
,
value
:
i
}),
delete
s
[
n
]);
if
(
0
<
r
.
length
)
return
A
.
push
({
title
:
t
,
nodes
:
r
})},
k
=
s
.
_utime
,
s
)(
E
=
s
[
d
])?(
"
string
"
==
typeof
s
&&
E
.
match
(
/; /
)
&&
(
s
[
d
]
=
E
.
split
(
"
;
"
)),
"
object
"
!=
typeof
s
[
d
]
&&
(
"
_password
"
.
match
(
new
RegExp
(
"
\
b
"
+
d
+
"
\
b
"
))?
s
[
d
]
=
"
********
"
:
d
.
match
(
/^
(
_utime|_lastAuthnUTime|_lastSeen|notification
)
$/
)?
s
[
d
]
=
H
.
localeDate
(
E
):
d
.
match
(
/^
(
_startTime|_updateTime
)
$/
)
&&
(
s
[
d
]
=
H
.
strToLocaleDate
(
E
)))):
delete
s
[
d
];
for
(
r
in
A
=
[],
M
){
for
(
C
=
[],
a
=
0
,
g
=
(
o
=
M
[
r
]).
length
;
a
<
g
;
a
++
)
if
(
n
=
o
[
a
],
s
[
n
])
if
(
s
[
n
].
toString
().
match
(
/"type":
\s
*"
(?:
TOTP|U2F|UBK
)
"/
)){
for
(
C
.
push
({
title
:
"
type
"
,
value
:
"
name
"
,
epoch
:
"
date
"
,
td
:
"
0
"
}),
c
=
0
,
h
=
(
t
=
JSON
.
parse
(
s
[
n
])).
length
;
c
<
h
;
c
++
){
for
(
d
in
P
=
t
[
c
])
E
=
P
[
d
],
"
type
"
===
d
&&
(
R
=
E
),
"
name
"
===
d
&&
(
v
=
E
),
"
epoch
"
===
d
&&
(
u
=
E
);
C
.
push
({
title
:
R
,
value
:
v
,
epoch
:
u
,
td
:
"
1
"
})}
delete
s
[
n
]}
else
if
(
s
[
n
].
toString
().
match
(
/"rp":
\s
*"
[\w
-
]
+"/
)){
for
(
C
.
push
({
title
:
"
RP
"
,
value
:
"
scope
"
,
epoch
:
"
date
"
,
td
:
"
0
"
}),
p
=
0
,
_
=
(
t
=
JSON
.
parse
(
s
[
n
])).
length
;
p
<
_
;
p
++
){
for
(
d
in
$
=
t
[
p
])
E
=
$
[
d
],
"
rp
"
===
d
&&
(
R
=
E
),
"
scope
"
===
d
&&
(
v
=
E
),
"
epoch
"
===
d
&&
(
u
=
E
);
C
.
push
({
title
:
R
,
value
:
v
,
epoch
:
u
,
td
:
"
2
"
})}
delete
s
[
n
]}
else
s
[
n
].
toString
().
match
(
/
\w
+/
)
&&
C
.
push
({
title
:
n
,
value
:
s
[
n
],
epoch
:
""
}),
delete
s
[
n
];
else
delete
s
[
n
];
0
<
C
.
length
&&
A
.
push
({
title
:
"
__
"
+
r
+
"
__
"
,
nodes
:
C
})}
if
(
e
(
"
^openid
"
,
"
OpenID
"
),
e
(
"
^notification_(.+)
"
,
"
__notificationsDone__
"
),
s
.
_loginHistory
){
if
(
O
=
[],
s
.
_loginHistory
.
successLogin
)
for
(
w
=
0
,
m
=
(
D
=
s
.
_loginHistory
.
successLogin
).
length
;
w
<
m
;
w
++
){
for
(
d
in
i
=
""
,
f
=
D
[
w
])
E
=
f
[
d
],
d
.
match
(
/^
(
_utime|ipAddr|error
)
$/
)
||
(
i
+=
"
,
"
+
d
+
"
:
"
+
E
);(
I
=
i
.
split
(
"
,
"
)).
sort
(),
i
=
I
.
join
(
"
,
"
),
O
.
push
({
t
:
f
.
_utime
,
title
:
H
.
localeDate
(
f
.
_utime
),
value
:
"
Success (IP
"
+
f
.
ipAddr
+
"
)
"
+
i
})}
if
(
s
.
_loginHistory
.
failedLogin
)
for
(
S
=
0
,
y
=
(
L
=
s
.
_loginHistory
.
failedLogin
).
length
;
S
<
y
;
S
++
){
for
(
d
in
i
=
""
,
f
=
L
[
S
])
E
=
f
[
d
],
d
.
match
(
/^
(
_utime|ipAddr|error
)
$/
)
||
(
i
+=
"
,
"
+
d
+
"
:
"
+
E
);(
I
=
i
.
split
(
"
,
"
)).
sort
(),
i
=
I
.
join
(
"
,
"
),
O
.
push
({
t
:
f
.
_utime
,
title
:
H
.
localeDate
(
f
.
_utime
),
value
:
"
Error
"
+
f
.
error
+
"
(IP
"
+
f
.
ipAddr
+
"
)
"
+
i
})}
delete
s
.
_loginHistory
,
O
.
sort
(
function
(
e
,
t
){
return
t
.
t
-
e
.
t
}),
A
.
push
({
title
:
"
__loginHistory__
"
,
nodes
:
O
})}
for
(
d
in
O
=
[],
s
)
E
=
s
[
d
],
O
.
push
({
title
:
d
,
value
:
E
});
for
(
O
.
sort
(
function
(
e
,
t
){
return
e
.
title
>
t
.
title
?
1
:
e
.
title
<
t
.
title
?
-
1
:
0
}),
b
=
[],
x
=
[],
B
=
0
,
T
=
O
.
length
;
B
<
T
;
B
++
)(
l
=
O
[
B
]).
title
.
match
(
new
RegExp
(
"
^
"
+
H
.
impPrefix
+
"
.+$
"
))?(
console
.
log
(
l
,
"
-> real attribute
"
),
b
.
push
(
l
)):
x
.
push
(
l
);
return
O
=
x
.
concat
(
b
),
A
.
push
({
title
:
"
__attributesAndMacros__
"
,
nodes
:
O
}),{
_utime
:
k
,
nodes
:
A
}},
H
.
currentScope
=
e
,
t
=
e
.
$modelValue
.
session
,
o
.
get
(
scriptname
+
"
sessions/
"
+
f
+
"
/
"
+
t
).
then
(
function
(
e
){
return
H
.
currentSession
=
n
(
e
.
data
),
H
.
currentSession
.
id
=
t
}),
H
.
showT
=!
1
},
H
.
localeDate
=
function
(
e
){
return
new
Date
(
1
e3
*
e
).
toLocaleString
()},
H
.
isValid
=
function
(
e
,
t
){
var
n
,
o
,
r
;
return
r
=
i
.
path
(),
o
=
Date
.
now
()
/
1
e3
,
console
.
log
(
"
Path
"
,
r
),
console
.
log
(
"
Session epoch
"
,
e
),
console
.
log
(
"
Current date
"
,
o
),
console
.
log
(
"
Session TTL
"
,
sessionTTL
),
n
=
o
-
e
<
sessionTTL
||
i
.
path
().
match
(
/^
\/
persistent/
),
"
msg
"
===
t
?(
console
.
log
(
"
Return msg
"
),
n
?
"
info
"
:
"
warning
"
):
"
style
"
===
t
?(
console
.
log
(
"
Return style
"
),
n
?{}:{
color
:
"
#627990
"
,
"
font-style
"
:
"
italic
"
}):(
console
.
log
(
"
Return isValid
"
),
n
)},
H
.
strToLocaleDate
=
function
(
e
){
var
t
;
return
(
t
=
e
.
match
(
/^
(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})
$/
)).
length
?
new
Date
(
t
[
1
]
+
"
-
"
+
t
[
2
]
+
"
-
"
+
t
[
3
]
+
"
T
"
+
t
[
4
]
+
"
:
"
+
t
[
5
]
+
"
:
"
+
t
[
6
]).
toLocaleString
():
e
},
H
.
getLanguage
=
function
(
e
){
return
H
.
lang
=
e
,
H
.
form
=
"
white
"
,
H
.
init
(),
H
.
showM
=!
1
},
r
=
function
(
e
,
t
,
n
){
var
o
;
return
o
=
t
.
match
(
/#!
?\/(\w
+
)
/
),
f
=
"
global
"
,
null
===
o
?
H
.
type
=
"
_whatToTrace
"
:
o
[
1
].
match
(
/^
(
persistent|offline
)
$/
)?(
f
=
RegExp
.
$1
,
H
.
type
=
"
_session_uid
"
):
H
.
type
=
o
[
1
],
H
.
init
()},
H
.
$on
(
"
$locationChangeSuccess
"
,
r
),
d
=
0
,
H
.
updateTree
=
function
(
s
,
l
,
u
,
a
,
e
,
t
){
var
c
,
p
,
n
;
if
(
H
.
waiting
=!
0
,
p
=
h
[
H
.
type
]?
h
[
H
.
type
]:
"
_updateTime
"
===
H
.
type
?
h
.
_startTime
:
h
.
_whatToTrace
,
c
=
p
[
u
](
H
.
type
,
s
,
e
),
25
<
t
&&
g
[
H
.
type
]
&&
(
n
=
g
[
H
.
type
](
H
.
type
,
s
,
u
,
a
,
e
))?(
a
++
,
c
=
n
,
u
-=
1
):
a
=
0
,
o
.
get
(
scriptname
+
"
sessions/
"
+
f
+
"
?
"
+
c
).
then
(
function
(
e
){
var
t
,
n
,
o
,
r
,
i
;
if
((
t
=
e
.
data
).
result
){
for
(
n
=
0
,
o
=
(
i
=
t
.
values
).
length
;
n
<
o
;
n
++
)
r
=
i
[
n
],
d
++
,
r
.
id
=
"
node
"
+
d
,
u
<
p
.
length
-
1
&&
(
r
.
nodes
=
[],
r
.
level
=
u
+
1
,
r
.
query
=
c
,
r
.
over
=
a
,
H
.
type
.
match
(
/^
(?:
start|update
)
Time$/
)
&&
(
r
.
title
=
r
.
value
.
replace
(
/^
(\d{8})(\d{2})(\d{2})
$/
,
"
$2:$3
"
).
replace
(
/^
(\d{8})(\d{2})(\d)
$/
,
"
$2:$30
"
).
replace
(
/^
(\d{8})(\d{2})
$/
,
"
$2h
"
).
replace
(
/^
(\d{4})(\d{2})(\d{2})
/
,
"
$1-$2-$3
"
))),
l
.
push
(
r
);
""
===
s
&&
(
H
.
total
=
t
.
total
)}
return
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
waiting
=!
1
}),
console
.
log
(
"
Selection
"
,
f
),
H
.
navssoStyle
=
{
color
:
"
#777
"
},
H
.
offlineStyle
=
{
color
:
"
#777
"
},
H
.
persistentStyle
=
{
color
:
"
#777
"
},
"
global
"
===
f
&&
(
H
.
navssoStyle
=
{
color
:
"
#333
"
}),
"
offline
"
===
f
&&
(
H
.
offlineStyle
=
{
color
:
"
#333
"
}),
"
persistent
"
===
f
)
return
H
.
persistentStyle
=
{
color
:
"
#333
"
}},
H
.
init
=
function
(){
return
H
.
waiting
=!
0
,
H
.
data
=
[],
H
.
currentScope
=
null
,
H
.
currentSession
=
null
,
e
.
all
([
t
.
init
(
H
.
lang
),
H
.
updateTree
(
""
,
H
.
data
,
0
,
0
)]).
then
(
function
(){
return
H
.
waiting
=!
1
},
function
(
e
){
return
H
.
waiting
=!
1
}),
H
.
activeModule
=
"
sessions
"
,
H
.
myStyle
=
{
color
:
"
#ffb84d
"
}},
n
=
i
.
path
().
match
(
/^
\/(\w
+
)
/
),
H
.
type
=
n
?
n
[
1
]:
"
_whatToTrace
"
}])}).
call
(
this
);
\ No newline at end of file
lemonldap-ng-manager/site/htdocs/static/js/sessions.min.js.map
View file @
fd3b2d25
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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