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 Details

    • OAuth2AuthorizedClientCleanupProperties

      public OAuth2AuthorizedClientCleanupProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Whether to enable automatic cleanup of orphaned/outdated OAuth2AuthorizedClientEntity instances.
    • getClusterNamespace

      public String 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

      public Duration getMinCleanupInterval()
      The minimum amount of time to pause between each batch cleanup attempt. You can set this value equal to or greater than maxCleanupInterval to achieve a constant, non-randomized value.
    • getMaxCleanupInterval

      public Duration getMaxCleanupInterval()
      The maximum amount of time to pause between each batch cleanup attempt.
    • getMaxAllowedAccessTokenExpAgeIfNoValidRefreshToken

      public Duration 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

      public Duration 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

      public Duration 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

      public void setClusterNamespace(String clusterNamespace)
      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

      public void setMinCleanupInterval(Duration minCleanupInterval)
      The minimum amount of time to pause between each batch cleanup attempt. You can set this value equal to or greater than maxCleanupInterval to achieve a constant, non-randomized value.
    • setMaxCleanupInterval

      public void setMaxCleanupInterval(Duration maxCleanupInterval)
      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.