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
dmp
OpenAIRE-EUDAT-DMP-service-pilot
Commits
596550d3
Commit
596550d3
authored
Jul 21, 2021
by
George Kalampokis
Browse files
Extend user token duration to 10 days
parent
c91059c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
dmp-backend/web/src/main/java/eu/eudat/logic/services/operations/authentication/AbstractAuthenticationService.java
View file @
596550d3
...
...
@@ -100,7 +100,7 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer
UserToken
userToken
=
this
.
apiContext
.
getOperationsContext
().
getBuilderFactory
().
getBuilder
(
UserTokenBuilder
.
class
)
.
issuedAt
(
new
Date
()).
user
(
credential
.
getUserInfo
())
.
token
(
UUID
.
randomUUID
()).
expiresAt
(
Timestamp
.
valueOf
(
LocalDateTime
.
now
().
plusDays
(
1
)))
.
token
(
UUID
.
randomUUID
()).
expiresAt
(
Timestamp
.
valueOf
(
LocalDateTime
.
now
().
plusDays
(
1
0
)))
.
build
();
userToken
=
apiContext
.
getOperationsContext
().
getDatabaseRepository
().
getUserTokenDao
().
createOrUpdate
(
userToken
);
...
...
@@ -200,7 +200,7 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer
UserToken
userToken
=
this
.
apiContext
.
getOperationsContext
().
getBuilderFactory
().
getBuilder
(
UserTokenBuilder
.
class
)
.
token
(
UUID
.
randomUUID
()).
user
(
userInfo
)
.
expiresAt
(
Timestamp
.
valueOf
(
LocalDateTime
.
now
().
plusDays
(
1
))).
issuedAt
(
new
Date
())
.
expiresAt
(
Timestamp
.
valueOf
(
LocalDateTime
.
now
().
plusDays
(
1
0
))).
issuedAt
(
new
Date
())
.
build
();
apiContext
.
getOperationsContext
().
getDatabaseRepository
().
getUserTokenDao
().
createOrUpdate
(
userToken
);
...
...
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