Remove AuthenticatorDelegate::{client_error, request_failure}

These methods are never called.
This commit is contained in:
Glenn Griffin
2019-11-20 15:03:08 -08:00
parent 73af51bab6
commit 1d25341c66

View File

@@ -1,6 +1,6 @@
//! Module containing types related to delegates.
use crate::error::{Error, PollError, RefreshError};
use crate::error::{PollError, RefreshError};
use std::error::Error as StdError;
use std::fmt;
@@ -69,16 +69,6 @@ impl StdError for PollError {
/// The only method that needs to be implemented manually is `present_user_code(...)`,
/// as no assumptions are made on how this presentation should happen.
pub trait AuthenticatorDelegate: Send + Sync {
/// Called whenever there is an client, usually if there are network problems.
///
/// Return retry information.
fn client_error(&self, _: &hyper::Error) -> Retry {
Retry::Abort
}
/// The server denied the attempt to obtain a request code
fn request_failure(&self, _: Error) {}
/// Called if we could not acquire a refresh token for a reason possibly specified
/// by the server.
/// This call is made for the delegate's information only.