-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: bugA general bugA general bug
Milestone
Description
ClientRegistrationsTests asserts the following
MockWebServer server;
// ...
assertThat(registration.getRegistrationId()).isEqualTo(this.server.getHostName());This works coincidentally when the hostname is all lower-case. However, due to a nuance between how MockWebServer computes the hostname and the URL, this check fails when the hostname has mixed case.
Instead, the test should compute the hostname from the issuer, which is the same thing that ClientRegistrations does when determining the default registrationId:
assertThat(registration.getRegistrationId()).isEqualTo(URI.create(this.issuer).getHost());Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: bugA general bugA general bug