Files
duplicati/Duplicati/WebserverCore/Endpoints/V1/ProgressState.cs
T
Kenneth Skovhede 3f29642f6c Implemented JWT tokens.
Added auth requirement on all endpoints.
Added SignIn-, Access- and Refresh-Tokens based on JWT.
Upgraded stored password to be based on PBKDF2.
Added default password assignment.
Updated logic to support auth-header and re-sign-in for tray-icon and web-ui.
2024-06-19 13:54:10 +02:00

23 lines
620 B
C#

using Duplicati.Library.RestAPI;
using Duplicati.WebserverCore.Abstractions;
using Duplicati.WebserverCore.Exceptions;
namespace Duplicati.WebserverCore.Endpoints.V1;
public class ProgressState : IEndpointV1
{
public static void Map(RouteGroupBuilder group)
{
group.MapGet("/progressstate", Execute)
.RequireAuthorization();
}
private static Server.Serialization.Interface.IProgressEventData Execute()
{
if (FIXMEGlobal.GenerateProgressState == null)
throw new NotFoundException("No active backup");
return FIXMEGlobal.GenerateProgressState();
}
}