Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coscine
backend
apis
Project
Commits
49dbf8f1
Commit
49dbf8f1
authored
Jul 09, 2019
by
Benedikt Heinrichs
Browse files
Change JWT Existence time
parent
7fb4f8d6
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Project/JWTHandler.cs
View file @
49dbf8f1
...
...
@@ -77,7 +77,7 @@ namespace Coscine.Api.Project
var
payloadClaims
=
payloadContents
.
Select
(
c
=>
new
Claim
(
c
.
Key
,
c
.
Value
));
DateTime
centuryBegin
=
new
DateTime
(
1970
,
1
,
1
);
var
exp
=
new
TimeSpan
(
DateTime
.
Now
.
Add
Years
(
1
).
Ticks
-
centuryBegin
.
Ticks
).
TotalSeconds
;
var
exp
=
new
TimeSpan
(
DateTime
.
Now
.
Add
Minutes
(
30
).
Ticks
-
centuryBegin
.
Ticks
).
TotalSeconds
;
var
now
=
new
TimeSpan
(
DateTime
.
Now
.
Ticks
-
centuryBegin
.
Ticks
).
TotalSeconds
;
var
payload
=
new
JwtPayload
(
payloadClaims
);
...
...
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