mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 08:43:21 +00:00
HandleTokenStateAsync before each API call for refresh and auth bearer migration
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.App.Models.Api
|
||||
{
|
||||
@@ -8,6 +9,8 @@ namespace Bit.App.Models.Api
|
||||
public string MasterPasswordHash { get; set; }
|
||||
public string Token { get; set; }
|
||||
public int? Provider { get; set; }
|
||||
[Obsolete]
|
||||
public string OldAuthBearer { get; set; }
|
||||
public DeviceRequest Device { get; set; }
|
||||
|
||||
public IDictionary<string, string> ToIdentityTokenRequest()
|
||||
@@ -21,6 +24,11 @@ namespace Bit.App.Models.Api
|
||||
{ "client_id", "mobile" }
|
||||
};
|
||||
|
||||
if(OldAuthBearer != null)
|
||||
{
|
||||
dict.Add("OldAuthBearer", OldAuthBearer);
|
||||
}
|
||||
|
||||
if(Device != null)
|
||||
{
|
||||
dict.Add("DeviceType", Device.Type.ToString());
|
||||
|
||||
Reference in New Issue
Block a user