mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-04 09:58:13 +01:00
Builds on #1368 This PR adds a new endpoint: Get current user.. It only returns the current user's id and email for now( let's extend later) It also adds a new permission: `ProfileManagement` which is needed for this endpoint (and for update endpoints later)
26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace BTCPayServer.Security.APIKeys
|
|
{
|
|
public static class APIKeyConstants
|
|
{
|
|
public const string AuthenticationType = "APIKey";
|
|
|
|
public static class ClaimTypes
|
|
{
|
|
public const string Permissions = nameof(APIKeys) + "." + nameof(Permissions);
|
|
}
|
|
|
|
public static class Permissions
|
|
{
|
|
public static readonly Dictionary<string, (string Title, string Description)> PermissionDescriptions = new Dictionary<string, (string Title, string Description)>()
|
|
{
|
|
{Client.Permissions.StoreManagement, ("Manage your stores", "The app will be able to create, modify and delete all your stores.")},
|
|
{$"{nameof(Client.Permissions.StoreManagement)}:", ("Manage selected stores", "The app will be able to modify and delete selected stores.")},
|
|
{Client.Permissions.ServerManagement, ("Manage your server", "The app will have total control on your server")},
|
|
{Client.Permissions.ProfileManagement, ("Manage your profile", "The app will be able to view and modify your user profile.")},
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|