refactor(ext-oidc): replace auth modules with security extensions #17
@@ -7,6 +7,7 @@ import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* A request being built against a {@link FlashTest} server. The HTTP verb is terminal — it
|
||||
@@ -41,6 +42,12 @@ public final class FlashRequest {
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Applies {@code customizer} — how an extension's test kit attaches a credential, for instance. */
|
||||
public FlashRequest with(Consumer<FlashRequest> customizer) {
|
||||
customizer.accept(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets a UTF-8 request body. */
|
||||
public FlashRequest body(String text) {
|
||||
this.body = Objects.requireNonNull(text, "text").getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
Reference in New Issue
Block a user