Skip to content

ClientRegistration.Builder.tokenUri() should take a URI parameter, not a String #17424

Closed
@walles

Description

@walles

Expected Behavior

ClientRegistration.Builder.tokenUri() accepts a URI as its parameter.

		public Builder tokenUri(URI tokenUri) {  // <- Note the data type of the parameter
			this.tokenUri = tokenUri;
			return this;
		}

Current Behavior

ClientRegistration.Builder.tokenUri() accepts 🚨 a String as its tokenUri parameter.

public Builder tokenUri(String tokenUri) {
this.tokenUri = tokenUri;
return this;
}

Context

We accidentally sent the wrong parameter to ClientRegistration.Builder.tokenUri().

This cost us troubleshooting time.

If tokenUri() had required a URI rather than a String, the compiler would have caught this, saving us troubleshooting time.

Note that this would be an API breaking change, so I'm guessing this fix would have to wait for v7.

Note also that some related fields / methods should also get their types fixed accordingly. At least in this file, but potentially elsewhere in the project as well.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions