aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/Mastodon.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-09 07:12:48 +0300
committerGravatar Vitaly Takmazov2023-01-09 07:12:48 +0300
commit6b08c391d27a682ffece9e9c471986160e2f94af (patch)
tree6926e1c263d364970594d71544464cbffbd0a319 /src/main/java/com/juick/www/api/Mastodon.java
parentd899fdeb4596759b2e22e20e407d7b65797b7123 (diff)
OAuth: update refresh token TTL
Diffstat (limited to 'src/main/java/com/juick/www/api/Mastodon.java')
-rw-r--r--src/main/java/com/juick/www/api/Mastodon.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/api/Mastodon.java b/src/main/java/com/juick/www/api/Mastodon.java
index 3d31dcdf..af1c5ef7 100644
--- a/src/main/java/com/juick/www/api/Mastodon.java
+++ b/src/main/java/com/juick/www/api/Mastodon.java
@@ -118,7 +118,8 @@ public class Mastodon {
.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
.redirectUri(redirectUri)
.scopes((coll) -> coll.addAll(parseScopes(scopes)))
- .tokenSettings(TokenSettings.builder().accessTokenTimeToLive(Duration.ofDays(365)).build())
+ .tokenSettings(TokenSettings.builder().accessTokenTimeToLive(Duration.ofDays(365))
+ .refreshTokenTimeToLive(Duration.ofDays(365 * 5)).build())
.clientSettings(ClientSettings.builder().requireAuthorizationConsent(true).build()).build();
registeredClientRepository.save(registeredClient);
return new ApplicationResponse(