using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace LeanCloud.Storage.Internal {
public interface IAVAuthenticationProvider {
///
/// Authenticates with the service.
///
/// The cancellation token.
Task> AuthenticateAsync(CancellationToken cancellationToken);
///
/// Deauthenticates (logs out) the user associated with this provider. This
/// call may block.
///
void Deauthenticate();
///
/// Restores authentication that has been serialized, such as session keys,
/// etc.
///
/// The auth data for the provider. This value may be null
/// when unlinking an account.
/// true iff the authData was successfully synchronized. A false return
/// value indicates that the user should no longer be associated because of bad auth
/// data.
bool RestoreAuthentication(IDictionary authData);
///
/// Provides a unique name for the type of authentication the provider does.
/// For example, the FacebookAuthenticationProvider would return "facebook".
///
string AuthType { get; }
}
}