Remove TokenRepository dependency from InvoiceControllerAPI

This commit is contained in:
nicolas.dorier
2018-04-28 02:51:20 +09:00
parent 8ff81f1648
commit 07c2f6b810
5 changed files with 113 additions and 83 deletions

View File

@@ -148,6 +148,11 @@ namespace BTCPayServer
return principal.Claims.Where(c => c.Type == Claims.SIN).Select(c => c.Value).FirstOrDefault();
}
public static string GetStoreId(this ClaimsPrincipal principal)
{
return principal.Claims.Where(c => c.Type == Claims.OwnStore).Select(c => c.Value).FirstOrDefault();
}
private static JsonSerializerSettings jsonSettings = new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() };
public static string ToJson(this object o)
{