Extend user token duration to 10 days
This commit is contained in:
parent
c91059c854
commit
596550d3de
|
@ -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(10)))
|
||||
.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(10))).issuedAt(new Date())
|
||||
.build();
|
||||
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getUserTokenDao().createOrUpdate(userToken);
|
||||
|
|
Loading…
Reference in New Issue