Add default refresh strategy

This commit is contained in:
René Pfeuffer
2018-11-30 11:35:20 +01:00
parent f7fc81b626
commit 57753e4de0
3 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
package sonia.scm.security;
import sonia.scm.plugin.Extension;
@Extension
public class DefaultJwtAccessTokenRefreshStrategy extends PercentageJwtAccessTokenRefreshStrategy {
public DefaultJwtAccessTokenRefreshStrategy() {
super(0.5F);
}
}

View File

@@ -1,5 +1,8 @@
package sonia.scm.security;
import sonia.scm.plugin.ExtensionPoint;
@ExtensionPoint
public interface JwtAccessTokenRefreshStrategy {
boolean shouldBeRefreshed(JwtAccessToken oldToken);
}