mirror of
https://github.com/bitwarden/android.git
synced 2024-12-18 23:31:52 +03:00
Added device identifier as header to api calls
This commit is contained in:
parent
57b6c9f67c
commit
515412f863
1 changed files with 5 additions and 0 deletions
|
@ -11,7 +11,12 @@ namespace Bit.App
|
||||||
public TokenHttpRequestMessage()
|
public TokenHttpRequestMessage()
|
||||||
{
|
{
|
||||||
var authService = Resolver.Resolve<IAuthService>();
|
var authService = Resolver.Resolve<IAuthService>();
|
||||||
|
var appIdService = Resolver.Resolve<IAppIdService>();
|
||||||
Headers.Add("Authorization", $"Bearer {authService.Token}");
|
Headers.Add("Authorization", $"Bearer {authService.Token}");
|
||||||
|
if(!string.IsNullOrWhiteSpace(appIdService.AppId))
|
||||||
|
{
|
||||||
|
Headers.Add("DeviceIdentifier", appIdService.AppId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TokenHttpRequestMessage(object requestObject)
|
public TokenHttpRequestMessage(object requestObject)
|
||||||
|
|
Loading…
Reference in a new issue