diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-09-03 19:17:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 19:17:13 +0200 |
| commit | fb5385f1df55c7a2ee35981ac138cee6c62c903d (patch) | |
| tree | 8ca7b09583a1195e507d347bcbddbabb039f47fc /MediaBrowser.Controller/Security/IAuthenticationManager.cs | |
| parent | 95ca1d54876e928dc654736ff5a279728c0f9ed0 (diff) | |
| parent | ff9d14c8119f6cf77f21e4ebcc97c5580725b882 (diff) | |
Merge pull request #6201 from barronpm/authenticationdb-efcore
Migrate Authentication DB to EF Core
Diffstat (limited to 'MediaBrowser.Controller/Security/IAuthenticationManager.cs')
| -rw-r--r-- | MediaBrowser.Controller/Security/IAuthenticationManager.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Security/IAuthenticationManager.cs b/MediaBrowser.Controller/Security/IAuthenticationManager.cs new file mode 100644 index 000000000..29621b73e --- /dev/null +++ b/MediaBrowser.Controller/Security/IAuthenticationManager.cs @@ -0,0 +1,34 @@ +#nullable enable + +using System; +using System.Collections.Generic; +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> + Task DeleteApiKey(string accessToken); + } +} |
