mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Add default refresh strategy
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package sonia.scm.security;
|
||||
|
||||
import sonia.scm.plugin.Extension;
|
||||
|
||||
@Extension
|
||||
public class DefaultJwtAccessTokenRefreshStrategy extends PercentageJwtAccessTokenRefreshStrategy {
|
||||
public DefaultJwtAccessTokenRefreshStrategy() {
|
||||
super(0.5F);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package sonia.scm.security;
|
||||
|
||||
import sonia.scm.plugin.ExtensionPoint;
|
||||
|
||||
@ExtensionPoint
|
||||
public interface JwtAccessTokenRefreshStrategy {
|
||||
boolean shouldBeRefreshed(JwtAccessToken oldToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user