Class OAuth2AuthorizedClientCleanupProperties
java.lang.Object
com.broadleafcommerce.auth.client.autoconfigure.OAuth2AuthorizedClientCleanupProperties
@ConfigurationProperties("broadleaf.auth.user.web.authorization.authorized-client-entity-cleanup")
public class OAuth2AuthorizedClientCleanupProperties
extends Object
Properties for configuring cleanup of
OAuth2AuthorizedClientEntity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The quantity of outdated entities to process/delete at one time.Namespace to use when getting the view for the camel cluster.For entities that have no valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup.For entities that have a valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup.The maximum amount of time to pause between each batch cleanup attempt.The minimum amount of time to pause between each batch cleanup attempt.For entities where a refresh token has been set, the refresh token must have expired at least this much time ago to be considered invalid and unusable.boolean
Whether to enable automatic cleanup of orphaned/outdated OAuth2AuthorizedClientEntity instances.void
setCleanupBatchSize
(int cleanupBatchSize) The quantity of outdated entities to process/delete at one time.void
setClusterNamespace
(String clusterNamespace) Namespace to use when getting the view for the camel cluster.void
setEnabled
(boolean enabled) Whether to enable automatic cleanup of orphaned/outdated OAuth2AuthorizedClientEntity instances.void
setMaxAllowedAccessTokenExpAgeIfNoValidRefreshToken
(Duration maxAllowedAccessTokenExpAgeIfNoValidRefreshToken) For entities that have no valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup.void
setMaxAllowedAccessTokenExpAgeIfValidRefreshToken
(Duration maxAllowedAccessTokenExpAgeIfValidRefreshToken) For entities that have a valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup.void
setMaxCleanupInterval
(Duration maxCleanupInterval) The maximum amount of time to pause between each batch cleanup attempt.void
setMinCleanupInterval
(Duration minCleanupInterval) The minimum amount of time to pause between each batch cleanup attempt.void
setRefreshTokenInvalidExpirationGracePeriod
(Duration refreshTokenInvalidExpirationGracePeriod) For entities where a refresh token has been set, the refresh token must have expired at least this much time ago to be considered invalid and unusable.
-
Constructor Details
-
OAuth2AuthorizedClientCleanupProperties
public OAuth2AuthorizedClientCleanupProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Whether to enable automatic cleanup of orphaned/outdated OAuth2AuthorizedClientEntity instances. -
getClusterNamespace
Namespace to use when getting the view for the camel cluster. -
getCleanupBatchSize
public int getCleanupBatchSize()The quantity of outdated entities to process/delete at one time. Should be somewhat conservative to avoid overworking the database or causing the transaction log to spiral out of control. -
getMinCleanupInterval
The minimum amount of time to pause between each batch cleanup attempt. You can set this value equal to or greater thanmaxCleanupInterval
to achieve a constant, non-randomized value. -
getMaxCleanupInterval
The maximum amount of time to pause between each batch cleanup attempt. -
getMaxAllowedAccessTokenExpAgeIfNoValidRefreshToken
For entities that have no valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup. -
getMaxAllowedAccessTokenExpAgeIfValidRefreshToken
For entities that have a valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup. -
getRefreshTokenInvalidExpirationGracePeriod
For entities where a refresh token has been set, the refresh token must have expired at least this much time ago to be considered invalid and unusable. Setting this to a small positive value will allow last-minute in-flight refresh attempts to succeed. -
setEnabled
public void setEnabled(boolean enabled) Whether to enable automatic cleanup of orphaned/outdated OAuth2AuthorizedClientEntity instances. -
setClusterNamespace
Namespace to use when getting the view for the camel cluster. -
setCleanupBatchSize
public void setCleanupBatchSize(int cleanupBatchSize) The quantity of outdated entities to process/delete at one time. Should be somewhat conservative to avoid overworking the database or causing the transaction log to spiral out of control. -
setMinCleanupInterval
The minimum amount of time to pause between each batch cleanup attempt. You can set this value equal to or greater thanmaxCleanupInterval
to achieve a constant, non-randomized value. -
setMaxCleanupInterval
The maximum amount of time to pause between each batch cleanup attempt. -
setMaxAllowedAccessTokenExpAgeIfNoValidRefreshToken
public void setMaxAllowedAccessTokenExpAgeIfNoValidRefreshToken(Duration maxAllowedAccessTokenExpAgeIfNoValidRefreshToken) For entities that have no valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup. -
setMaxAllowedAccessTokenExpAgeIfValidRefreshToken
public void setMaxAllowedAccessTokenExpAgeIfValidRefreshToken(Duration maxAllowedAccessTokenExpAgeIfValidRefreshToken) For entities that have a valid refresh token available, the access token must have expired at least this much time ago (from when a cleanup job runs) to be considered eligible for cleanup. -
setRefreshTokenInvalidExpirationGracePeriod
public void setRefreshTokenInvalidExpirationGracePeriod(Duration refreshTokenInvalidExpirationGracePeriod) For entities where a refresh token has been set, the refresh token must have expired at least this much time ago to be considered invalid and unusable. Setting this to a small positive value will allow last-minute in-flight refresh attempts to succeed.
-