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
e2bdb74a
Commit
e2bdb74a
authored
Sep 23, 2020
by
Chris Hines
Browse files
extend lifefime of certs
parent
201d05e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/accountinfo/accountinfo.component.html
View file @
e2bdb74a
<div
fxLayout=
"column"
fxLayoutAlign=
"start none"
style=
"width: 100%"
class=
"strudel-accountinfo-typography"
>
<div
*ngIf=
"nowSeconds(identity$ | async) ; let time"
>
Login certificates expire in {{ time }}
Login certificates expire in {{ time }}
(or when you 5 minutes after you close this tab, which ever comes first)
</div>
<div
*ngIf=
"identity$.value !== null && identity$.value !== undefined"
>
<!--<div *ngIf="identity$.value.systemalerts.value !== null">-->
...
...
src/app/keygen/keygen.component.ts
View file @
e2bdb74a
...
...
@@ -116,7 +116,8 @@ export class KeygenComponent implements OnInit, OnDestroy {
let
headers
=
new
HttpHeaders
({
'
Authorization
'
:
'
Bearer
'
+
token
.
token
});
let
options
=
{
headers
:
headers
,
withCredentials
:
false
};
var
now
=
new
Date
()
var
end
=
new
Date
(
now
.
getTime
()
+
24
*
60
*
60
*
1000
);
//request a certificate valid for 24 hours
var
end
=
new
Date
(
now
.
getTime
()
+
28
*
24
*
60
*
60
*
1000
);
//request a certificate valid for 28 days
//its expected that the user will terminate the session by closing their browser/sleeping their laptop before this
let
data
=
{
'
public_key
'
:
key
.
public
,
'
end
'
:
end
.
toISOString
()};
return
this
.
http
.
post
<
any
>
(
token
.
sshauthzservice
.
sign
,
data
,
options
).
pipe
(
tap
((
v
)
=>
console
.
log
(
'
in getCert
'
,
v
)),
...
...
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