You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
877 B
32 lines
877 B
using System.Threading.Tasks;
|
|
using MediaBrowser.Controller.Entities;
|
|
using MediaBrowser.Model.Users;
|
|
|
|
namespace MediaBrowser.Controller.Authentication
|
|
{
|
|
public interface IAuthenticationProvider
|
|
{
|
|
string Name { get; }
|
|
bool IsEnabled { get; }
|
|
Task<ProviderAuthenticationResult> Authenticate(string username, string password);
|
|
Task<bool> HasPassword(User user);
|
|
Task ChangePassword(User user, string newPassword);
|
|
}
|
|
|
|
public interface IRequiresResolvedUser
|
|
{
|
|
Task<ProviderAuthenticationResult> Authenticate(string username, string password, User resolvedUser);
|
|
}
|
|
|
|
public interface IHasNewUserPolicy
|
|
{
|
|
UserPolicy GetNewUserPolicy();
|
|
}
|
|
|
|
public class ProviderAuthenticationResult
|
|
{
|
|
public string Username { get; set; }
|
|
public string DisplayName { get; set; }
|
|
}
|
|
}
|