Add API Keys Application identifier

This lets the authorize api key screen redirect to the defined url  and provide it with the user id, permissions granted and the key.

This also allows apps to match existing api keys generated for it specifically using the application identifier, and if matched, presented with a confirmation page before redirection.
This commit is contained in:
Kukks
2020-02-28 19:42:17 +01:00
parent cf7c5102fc
commit 7ca74aeea7
5 changed files with 118 additions and 9 deletions

View File

@@ -15,6 +15,7 @@ namespace BTCPayServer.Data
[MaxLength(50)] public string StoreId { get; set; }
[MaxLength(50)] public string UserId { get; set; }
public string ApplicationIdentifier { get; set; }
public APIKeyType Type { get; set; } = APIKeyType.Legacy;
@@ -43,6 +44,8 @@ namespace BTCPayServer.Data
public class APIKeyBlob
{
public string[] Permissions { get; set; }
public string ApplicationIdentifier { get; set; }
public string ApplicationAuthority { get; set; }
}