mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2025-12-31 08:30:05 +01:00
This Removes RefreshError and PollError. Both those types can be fully represented within Error and there seems little value in distinguishing that they were resulting from device polling or refreshes. In either case the user will need to handle the response from token() calls similarly. This also removes the AuthenticatorDelegate since it only served to notify users when refreshes failed, which can already be done by looking at the return code from token. DeviceFlow no longer has the ability to set a wait_timeout. This is trivial to do by wrapping the token() call in a tokio::Timeout future so there's little benefit for users specifying this value. The DeviceFlowDelegate also no longer has the ability to specify when to abort, or alter the interval polling happens on, but it does gain understanding of the 'slow_down' response as documented in the oauth rfc. It seemed very unlikely the delegate was going to do anything other that timeout after a given time and that's already possible using tokio::Timeout so it needlessly complicated the implementation.