Added device identifier as header to api calls

This commit is contained in:
Kyle Spearrin 2016-06-30 21:40:44 -04:00
parent 57b6c9f67c
commit 515412f863

View file

@ -11,7 +11,12 @@ namespace Bit.App
public TokenHttpRequestMessage()
{
var authService = Resolver.Resolve<IAuthService>();
var appIdService = Resolver.Resolve<IAppIdService>();
Headers.Add("Authorization", $"Bearer {authService.Token}");
if(!string.IsNullOrWhiteSpace(appIdService.AppId))
{
Headers.Add("DeviceIdentifier", appIdService.AppId);
}
}
public TokenHttpRequestMessage(object requestObject)