1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-28 14:13:25 +00:00

identity server client for auth

This commit is contained in:
Kyle Spearrin
2017-05-06 20:20:57 -04:00
parent 7117f00480
commit d1cf6c68f3
15 changed files with 84 additions and 23 deletions

View File

@@ -0,0 +1,29 @@
using System.Net.Http;
using System;
using System.Net.Http.Headers;
namespace Bit.App
{
public class IdentityHttpClient : HttpClient
{
public IdentityHttpClient()
{
Init();
}
public IdentityHttpClient(HttpMessageHandler handler)
: base(handler)
{
Init();
}
private void Init()
{
//BaseAddress = new Uri("http://169.254.80.80:33656"); // Desktop from VS Android Emulator
//BaseAddress = new Uri("http://192.168.1.8:33656"); // Desktop
//BaseAddress = new Uri("https://identity-api.bitwarden.com"); // Preview
BaseAddress = new Uri("https://api.bitwarden.com"); // Production
DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
}
}