diff --git a/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/service/TppService.java b/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/service/TppService.java index 7c7ea68b7..b57564dc3 100644 --- a/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/service/TppService.java +++ b/powerauth-tpp-engine/src/main/java/io/getlime/security/powerauth/app/tppengine/service/TppService.java @@ -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);