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.
23 lines
620 B
C#
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();
|
|
}
|
|
}
|