diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-05-20 20:57:10 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-05-20 20:57:10 -0400 |
| commit | b03f2353d8bb023e659e735e12bd6230f07ca19c (patch) | |
| tree | 091e2e49660eb993063e9f2420a538ee60e12991 /Jellyfin.Data | |
| parent | f4d1c3ef7ab46cb37f400ef7688dd328d5d1626e (diff) | |
Generate Access token in constructor
Diffstat (limited to 'Jellyfin.Data')
| -rw-r--r-- | Jellyfin.Data/Entities/Security/Device.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Data/Entities/Security/Device.cs b/Jellyfin.Data/Entities/Security/Device.cs index 9bff7f0cf..bb05cf5a4 100644 --- a/Jellyfin.Data/Entities/Security/Device.cs +++ b/Jellyfin.Data/Entities/Security/Device.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Globalization; namespace Jellyfin.Data.Entities.Security { @@ -13,20 +14,19 @@ namespace Jellyfin.Data.Entities.Security /// Initializes a new instance of the <see cref="Device"/> class. /// </summary> /// <param name="userId">The user id.</param> - /// <param name="accessToken">The access token.</param> /// <param name="appName">The app name.</param> /// <param name="appVersion">The app version.</param> /// <param name="deviceName">The device name.</param> /// <param name="deviceId">The device id.</param> - public Device(Guid userId, string accessToken, string appName, string appVersion, string deviceName, string deviceId) + public Device(Guid userId, string appName, string appVersion, string deviceName, string deviceId) { UserId = userId; - AccessToken = accessToken; AppName = appName; AppVersion = appVersion; DeviceName = deviceName; DeviceId = deviceId; + AccessToken = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture); DateCreated = DateTime.UtcNow; DateLastActivity = DateCreated; |
