Skip to content

Commit

Permalink
Merge pull request #1420 from /issues/1419-redundant-duration
Browse files Browse the repository at this point in the history
Fix #1419: Redundant call of Duration.ofSeconds
  • Loading branch information
banterCZ authored Sep 15, 2023
2 parents 54917e1 + 9afc41b commit 20fc398
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ public TppAppDetailResponse createApp(CreateTppAppRequest request) throws Unable
registeredClientBuilder.scopes(s -> s.addAll(scopes));
registeredClientBuilder.clientSettings(ClientSettings.builder().build());
registeredClientBuilder.tokenSettings(TokenSettings.builder()
.refreshTokenTimeToLive(Duration.ofSeconds(tppEngineConfiguration.getDefaultRefreshTokenValidity().getSeconds()))
.accessTokenTimeToLive(Duration.ofSeconds(tppEngineConfiguration.getDefaultAccessTokenValidityInSeconds()))
.refreshTokenTimeToLive(tppEngineConfiguration.getDefaultRefreshTokenValidity())
.accessTokenTimeToLive(Duration.ofSeconds(tppEngineConfiguration.getDefaultAccessTokenValidityInSeconds()))
.build());
final RegisteredClient registeredClient = registeredClientBuilder.build();
registeredClientRepository.save(registeredClient);
Expand Down

0 comments on commit 20fc398

Please sign in to comment.