public struct RefreshWindow
Type that defines a time window used to identify excessive refresh calls. When enabled, prior to executing a
AuthenticationInterceptor compares the timestamp history of previous refresh calls against the
RefreshWindow. If more refreshes have occurred within the refresh window than allowed, the refresh is
cancelled and an
AuthorizationError.excessiveRefresh error is thrown.
TimeIntervaldefining the duration of the time window before the current time in which the number of refresh attempts is compared against
maximumAttempts. For example, if
intervalis 30 seconds, then the
RefreshWindowrepresents the past 30 seconds. If more attempts occurred in the past 30 seconds than
.excessiveRefresherror will be thrown.
public let interval: TimeInterval
Total refresh attempts allowed within
intervalbefore throwing an
public let maximumAttempts: Int
public init(interval: TimeInterval = 30.0, maximumAttempts: Int = 5)
TimeIntervaldefining the duration of the time window before the current time.
The maximum attempts allowed within the