Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hpc-team
strudelv2_spa
Commits
4ba29f54
Commit
4ba29f54
authored
May 15, 2020
by
Chris Hines
Browse files
better detection of when a certificate has expired
parent
89522064
Pipeline
#10303
passed with stages
in 3 minutes and 32 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/authorisation.service.ts
View file @
4ba29f54
...
...
@@ -203,8 +203,18 @@ public getKeys(id?: Identity) {
let
agentpipe$
=
agentquery$
.
pipe
(
tap
((
_
)
=>
this
.
notifications
.
notify
(
"
Updating the list of available accounts
"
)),
catchError
((
e
)
=>
{
this
.
querySshAgentError
(
e
);
return
of
([])}),
tap
((
resp
)
=>
this
.
agentContents
.
next
(
resp
)),
tap
((
_
)
=>
this
.
notifications
.
notify
(
""
))
tap
((
resp
)
=>
{
console
.
log
(
'
agent contents
'
,
resp
)
}),
tap
((
resp
)
=>
{
console
.
log
(
'
agent contents
'
,
resp
)
}),
tap
((
resp
)
=>
{
if
(
this
.
agentContents
.
value
!==
null
&&
this
.
agentContents
.
value
.
length
>
resp
.
length
)
{
this
.
notifications
.
notify
(
"
Your login expired. Please login again
"
);
console
.
log
(
'
login expired
'
);
}
else
{
this
.
notifications
.
notify
(
""
);
};
this
.
agentContents
.
next
(
resp
)
}),
//tap((_) => this.notifications.notify(""))
)
return
agentpipe$
}
...
...
src/app/jobs.service.ts
View file @
4ba29f54
...
...
@@ -39,6 +39,7 @@ export class JobsService {
}
public
getJobsError
(
error
,
identity
:
Identity
)
{
this
.
tsub
.
unsubscribe
()
this
.
authService
.
updateAgentContents
().
subscribe
((
_
)
=>
{
return
});
}
...
...
src/app/keygen/keygen.component.ts
View file @
4ba29f54
...
...
@@ -72,7 +72,7 @@ export class KeygenComponent implements OnInit, OnDestroy {
switchMap
((
_
)
=>
of
([
null
])),
);
agent$
.
subscribe
(
(
res
)
=>
this
.
router
.
navigate
([
sessionStorage
.
getItem
(
'
path
'
)]),
(
err
)
=>
{
this
.
logout
(
err
.
sshauthzservice
);
this
.
router
.
navigate
([
'
/noaccount
'
,
err
.
sshauthzservice
.
name
])})
(
err
)
=>
{
console
.
log
(
err
)
;
this
.
logout
(
err
.
sshauthzservice
);
this
.
router
.
navigate
([
'
/noaccount
'
,
err
.
sshauthzservice
.
name
])})
}
extractToken
(
frag
:
string
)
{
...
...
src/app/tes.service.ts
View file @
4ba29f54
...
...
@@ -368,20 +368,13 @@ public getSftpData(id: Identity, path: string, cd: string ) {
private
handleError
(
error
:
HttpErrorResponse
)
{
console
.
error
(
error
);
console
.
log
(
'
in handle error
'
);
if
(
error
.
error
instanceof
ErrorEvent
)
{
this
.
notifications
.
notify
(
"
A networking error occured.
"
)
return
}
else
{
var
re
=
/identity/gi
;
if
(
error
.
error
.
message
!=
undefined
)
{
let
searchresult
=
error
.
error
.
message
.
search
(
re
);
if
(
searchresult
!=
-
1
)
{
this
.
notifications
.
notify
(
'
Login expired, refreshing
'
);
this
.
authorisationService
.
updateAgentContents
();
return
}
return
this
.
notifications
.
notify
(
error
.
error
.
message
)
}
this
.
notifications
.
notify
(
"
Your login appears to have expired. Please login again
"
);
this
.
authorisationService
.
updateAgentContents
().
subscribe
((
v
)
=>
{
return
});
}
}
...
...
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