Class DeviceVerificationRateLimitedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.security.core.AuthenticationException
org.springframework.security.oauth2.core.OAuth2AuthenticationException
com.irurueta.authserver.authorization.api.web.implicit.DeviceVerificationRateLimitedException
All Implemented Interfaces:
Serializable

public class DeviceVerificationRateLimitedException extends org.springframework.security.oauth2.core.OAuth2AuthenticationException
Raised while a device verification request is converted when its client address or user made too many attempts. The error handler of the endpoint answers 429 with a Retry-After header instead of the framework's usual 400.
See Also:
  • Field Details

    • ERROR_CODE

      public static final String ERROR_CODE
      Error code of the exception.
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      Serial version.
      See Also:
    • retryAfter

      private final Duration retryAfter
      How long until the window ends and the attempts are accepted again.
  • Constructor Details

    • DeviceVerificationRateLimitedException

      public DeviceVerificationRateLimitedException(Duration retryAfter)
      Creates the exception.
      Parameters:
      retryAfter - how long until the attempts are accepted again.
  • Method Details

    • retryAfter

      public Duration retryAfter()
      Tells how long until the attempts are accepted again.
      Returns:
      the time to wait.