I've worked with some architectures where the web servers themselves are behind a firewall or load balancer and have no public IP of their own, and outgoing requests are made through an HTTP proxy server by some means, such as by specifying the proxy using PHP's stream_context_set_default(), setting CURLOPT_PROXY for PHP cURL, or using GuzzleHttp\RequestOptions::PROXY for Guzzle's PSR7 implementation (which I believe this project uses). It would be great if something similar could be done when instantiating Clerk, along the lines of:
$clerk = Clerk\Backend\ClerkBackend::builder()
->setSecurity(
"CLERK_SECRET_KEY"
)
->setHttpProxy(
"server:port"
)
->build();
...or, when setting options for a specific type of request:
$options = new Clerk\Backend\Helpers\Jwks\AuthenticateRequestOptions(
secretKey: "CLERK_SECRET_KEY",
authorizedParties: ["url1", "url2", ...],
httpProxy: "server:port"
);
I've worked with some architectures where the web servers themselves are behind a firewall or load balancer and have no public IP of their own, and outgoing requests are made through an HTTP proxy server by some means, such as by specifying the proxy using PHP's
stream_context_set_default(), settingCURLOPT_PROXYfor PHP cURL, or usingGuzzleHttp\RequestOptions::PROXYfor Guzzle's PSR7 implementation (which I believe this project uses). It would be great if something similar could be done when instantiating Clerk, along the lines of:...or, when setting options for a specific type of request: