diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2021-11-13 15:31:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-13 15:31:14 -0500 |
| commit | 761a4e8415b2fc1023679c24ddd66fabf237abec (patch) | |
| tree | 7524e612964a29e8c4db582fb59b2a5e9911a5f4 /Jellyfin.Api/Auth/CustomAuthenticationHandler.cs | |
| parent | f0028c728f7f6f018e356fb6a82c126ff8684d0b (diff) | |
| parent | 4a28f46cac30e2e1fabc84016d710bcd309a5344 (diff) | |
Merge pull request #6837 from crobibero/auth-exceptionv10.8.0-alpha2
Diffstat (limited to 'Jellyfin.Api/Auth/CustomAuthenticationHandler.cs')
| -rw-r--r-- | Jellyfin.Api/Auth/CustomAuthenticationHandler.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs index 369e846ae..bd3e7d9e3 100644 --- a/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs +++ b/Jellyfin.Api/Auth/CustomAuthenticationHandler.cs @@ -45,6 +45,11 @@ namespace Jellyfin.Api.Auth try { var authorizationInfo = await _authService.Authenticate(Request).ConfigureAwait(false); + if (!authorizationInfo.HasToken) + { + return AuthenticateResult.NoResult(); + } + var role = UserRoles.User; if (authorizationInfo.IsApiKey || authorizationInfo.User.HasPermission(PermissionKind.IsAdministrator)) { |
