Skip to content

Add ability to disable an endpoint #1924

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

Conversation

tommyttf
Copy link

@tommyttf tommyttf commented Mar 3, 2025

Add ability to disable endpoint

Related gh-1882

tommyttf added 2 commits March 2, 2025 14:50
…onServerConfigurer and OAuth2ClientAuthenticationConfigurer

Issue spring-projectsgh-1882

Signed-off-by: Tommy Tsang <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 3, 2025
@@ -170,6 +166,11 @@ public OAuth2AuthorizationServerConfigurer clientAuthentication(
return this;
}

public OAuth2AuthorizationServerConfigurer disableClientAuthentication() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in this comment:

I also think we should come up with a solution that allows other endpoints to be disabled if needed. I don't think a "flag" setting on all the configurers makes sense.

I consider disableClientAuthentication(), disableAuthorizationServerMetadataEndpoint(), disableAuthorizationEndpoint(), etc. to be a similar solution as proposed in the previous PR but with an "explicit" flag through the introduction of the disable** public methods.

As mentioned, this is still not ideal as it introduces too many new public API's and I would prefer a solution that is more isolated.

I have been thinking about this for a while and may have a solution to address this but unfortunately I don't have the time at the moment as I have a couple of other features I've been working on that are priority for the upcoming release.

I'm going to close this PR but if you have other ideas please comment in gh-1882 before submitting another PR.

@jgrandja jgrandja self-assigned this Mar 4, 2025
@jgrandja jgrandja added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 4, 2025
@jgrandja jgrandja closed this Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants