OpenID-Connect-PHP
OpenID-Connect-PHP copied to clipboard
Allow setting different discovery URL
When using https://www.rfc-editor.org/rfc/rfc7628.html a full URL to an OIDC discovery document is returned, not just an issuer to which a well-known can be appended. So it would be useful to have a way to put this full URL in to be used for discovery, overriding the default .well-known URL.
So you want to set a different openid-configuration endpoint? https://github.com/jumbojett/OpenID-Connect-PHP/blob/8ec206b60f87b4a1886c9c3eefa5f5d81d1ccc35/src/OpenIDConnectClient.php#L621
Yes, exactly, something that would override this whole line and become the URL for $well_known_config_url
So if you could extend the class and overwrite a new to build function like below that would be a solution? I can create a PR for this if you want.
class CustomOpenIDConnectClient extends OpenIDConnectClient
{
protected function getWellKnownConfigUrl()
{
return "https://custom-url.example/custom-endpoint";
}
}
Yes, that would be a fine solution for my case