mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-25 00:52:31 -04:00
Rework password handling
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
@Value
|
||||
public class ElevationConfig {
|
||||
|
||||
boolean requiresPassword;
|
||||
}
|
||||
@@ -28,6 +28,8 @@ public interface ShellControl extends ProcessControl {
|
||||
|
||||
ShellControl onExit(Consumer<ShellControl> pc);
|
||||
|
||||
ShellControl onFail(Consumer<Throwable> t);
|
||||
ElevationResult elevateCommand(String input) throws Exception;
|
||||
ShellControl withExceptionConverter(ExceptionConverter converter);
|
||||
|
||||
ShellControl withErrorFormatter(Function<String, String> formatter);
|
||||
@@ -90,12 +92,14 @@ public interface ShellControl extends ProcessControl {
|
||||
}
|
||||
}
|
||||
|
||||
ElevationResult elevateCommand(String input) throws Exception;
|
||||
ElevationResult buildElevatedCommand(String input) throws Exception;
|
||||
|
||||
void restart() throws Exception;
|
||||
|
||||
OsType getOsType();
|
||||
|
||||
ElevationConfig getElevationConfig();
|
||||
|
||||
ShellControl elevated(String message, FailableFunction<ShellControl, Boolean, Exception> elevationFunction);
|
||||
|
||||
default ShellControl elevationPassword(SecretValue value) {
|
||||
|
||||
Reference in New Issue
Block a user