Skip to content

Allow making requests via HTTP proxy #74

Description

@lapislazari

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"
);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions