< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.Net.AuthorizationInfo
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/Net/AuthorizationInfo.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 69
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_UserId()50%22100%

File(s)

/srv/git/jellyfin/MediaBrowser.Controller/Net/AuthorizationInfo.cs

#LineLine coverage
 1#nullable disable
 2
 3using System;
 4using Jellyfin.Data.Entities;
 5
 6namespace MediaBrowser.Controller.Net
 7{
 8    /// <summary>
 9    /// The request authorization info.
 10    /// </summary>
 11    public class AuthorizationInfo
 12    {
 13        /// <summary>
 14        /// Gets the user identifier.
 15        /// </summary>
 16        /// <value>The user identifier.</value>
 11517        public Guid UserId => User?.Id ?? Guid.Empty;
 18
 19        /// <summary>
 20        /// Gets or sets the device identifier.
 21        /// </summary>
 22        /// <value>The device identifier.</value>
 23        public string DeviceId { get; set; }
 24
 25        /// <summary>
 26        /// Gets or sets the device.
 27        /// </summary>
 28        /// <value>The device.</value>
 29        public string Device { get; set; }
 30
 31        /// <summary>
 32        /// Gets or sets the client.
 33        /// </summary>
 34        /// <value>The client.</value>
 35        public string Client { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets the version.
 39        /// </summary>
 40        /// <value>The version.</value>
 41        public string Version { get; set; }
 42
 43        /// <summary>
 44        /// Gets or sets the token.
 45        /// </summary>
 46        /// <value>The token.</value>
 47        public string Token { get; set; }
 48
 49        /// <summary>
 50        /// Gets or sets a value indicating whether the authorization is from an api key.
 51        /// </summary>
 52        public bool IsApiKey { get; set; }
 53
 54        /// <summary>
 55        /// Gets or sets the user making the request.
 56        /// </summary>
 57        public User User { get; set; }
 58
 59        /// <summary>
 60        /// Gets or sets a value indicating whether the token is authenticated.
 61        /// </summary>
 62        public bool IsAuthenticated { get; set; }
 63
 64        /// <summary>
 65        /// Gets or sets a value indicating whether the request has a token.
 66        /// </summary>
 67        public bool HasToken { get; set; }
 68    }
 69}

Methods/Properties

get_UserId()