Skip to content

Commit

Permalink
set expiration date to far future
Browse files Browse the repository at this point in the history
  • Loading branch information
bprize15 committed Dec 9, 2024
1 parent ff5d596 commit 4e5f3be
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import static org.mskcc.cbio.oncokb.config.cache.CompanyCacheResolver.COMPANIES_BY_ID_CACHE;
import static org.mskcc.cbio.oncokb.config.cache.CompanyCacheResolver.COMPANIES_BY_NAME_CACHE;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
Expand Down Expand Up @@ -290,7 +292,14 @@ public Optional<Token> createServiceAccountToken(Long id, String name) {

UserDetails[] serviceUserDetails = company.getServiceUsers().toArray(new UserDetails[company.getServiceUsers().size()]);
// since one service user should always be first in array
return Optional.of(tokenProvider.createToken(serviceUserDetails[0].getUser(), Optional.empty(), Optional.of(true), Optional.of(name)));
return Optional.of(tokenProvider.createToken(
serviceUserDetails[0].getUser(),
Optional.of(
LocalDateTime.of(9999, 1, 1, 0, 0).atZone(ZoneId.systemDefault()).toInstant()
),
Optional.of(true),
Optional.of(name)
));
}

private void clearCompanyCaches(Company company) {
Expand Down

0 comments on commit 4e5f3be

Please sign in to comment.