jellyfin/MediaBrowser.Controller/Security/IAuthenticationManager.cs

32 lines
1.0 KiB
C#
Raw Normal View History

using System.Collections.Generic;
2021-04-01 21:08:22 +00:00
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Security
{
/// <summary>
/// Handles the retrieval and storage of API keys.
/// </summary>
public interface IAuthenticationManager
{
/// <summary>
/// Creates an API key.
/// </summary>
/// <param name="name">The name of the key.</param>
/// <returns>A task representing the creation of the key.</returns>
Task CreateApiKey(string name);
/// <summary>
/// Gets the API keys.
/// </summary>
/// <returns>A task representing the retrieval of the API keys.</returns>
Task<IReadOnlyList<AuthenticationInfo>> GetApiKeys();
/// <summary>
/// Deletes an API key with the provided access token.
/// </summary>
/// <param name="accessToken">The access token.</param>
/// <returns>A task representing the deletion of the API key.</returns>
2021-06-18 22:26:58 +00:00
Task DeleteApiKey(string accessToken);
2021-04-01 21:08:22 +00:00
}
}