1
0
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:
Kyle Spearrin
2017-02-04 23:31:37 -05:00
parent 8ae95c4e30
commit 74239521cd
11 changed files with 216 additions and 30 deletions

View File

@@ -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());