Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting different discovery URL #371

Open
singpolyma opened this issue May 16, 2023 · 4 comments
Open

Allow setting different discovery URL #371

singpolyma opened this issue May 16, 2023 · 4 comments

Comments

@singpolyma
Copy link

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.

@ricklambrechts
Copy link
Contributor

So you want to set a different openid-configuration endpoint?

$well_known_config_url = rtrim($this->getProviderURL(), '/') . '/.well-known/openid-configuration';

@singpolyma
Copy link
Author

Yes, exactly, something that would override this whole line and become the URL for $well_known_config_url

@ricklambrechts
Copy link
Contributor

ricklambrechts commented May 16, 2023

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

@singpolyma
Copy link
Author

Yes, that would be a fine solution for my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants