diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-02-12 21:50:04 -0500 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-02-12 21:50:04 -0500 |
| commit | 3cce8731614e6846096bbe54fca8336e7f5d98d9 (patch) | |
| tree | 29cd942805e44502ddfc76bb27d4be64e2e72d40 /MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs | |
| parent | 5beccec1fada243f6c86053e6bcdd9dd78e9b87b (diff) | |
| parent | cfa2e5ed1de32f6f786afd036e7a13ed04c8f009 (diff) | |
Merge pull request #1012 from MediaBrowser/dev
3.0.5518.4
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index 4e9899301..cd4d23f5c 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -129,6 +129,20 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security if (tokenInfo != null) { info.UserId = tokenInfo.UserId; + + // TODO: Remove these checks for IsNullOrWhiteSpace + if (string.IsNullOrWhiteSpace(info.Client)) + { + info.Client = tokenInfo.AppName; + } + if (string.IsNullOrWhiteSpace(info.Device)) + { + info.Device = tokenInfo.DeviceName; + } + if (string.IsNullOrWhiteSpace(info.DeviceId)) + { + info.DeviceId = tokenInfo.DeviceId; + } } httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo; } |
