jellyfin/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs

39 lines
898 B
C#
Raw Normal View History

#pragma warning disable CS1591
using System.Threading.Tasks;
2020-05-12 19:10:35 -07:00
using Jellyfin.Data.Entities;
2018-12-27 16:27:57 -07:00
using MediaBrowser.Model.Users;
namespace MediaBrowser.Controller.Authentication
{
public interface IAuthenticationProvider
{
string Name { get; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
bool IsEnabled { get; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
Task<ProviderAuthenticationResult> Authenticate(string username, string password);
2019-05-21 10:28:34 -07:00
bool HasPassword(User user);
2018-12-27 16:27:57 -07:00
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; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public string DisplayName { get; set; }
}
}