Skip to content

Commit ffc8ae8

Browse files
authored
chore: upgrade testcontainers-ory-hydra to 0.0.6 (#176)
Bumps the pin past the release that deprecated the URI helpers and migrates the two call sites off them, dropping the @SuppressWarnings placeholders: with this app's synthetic path-bearing issuer the discovery document advertises endpoints under a prefix nothing serves, so the URIs are built from publicBaseUriString() instead of the discovery accessors. -Werror now guards the upstream deprecation boundary with no exceptions.
1 parent 859147a commit ffc8ae8

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
# Default pin. CI overrides this via -PtestcontainersOryHydraVersion (see settings.gradle.kts);
33
# do not inline this version back into build.gradle.kts.
4-
testcontainersOryHydra = "0.0.5"
4+
testcontainersOryHydra = "0.0.6"
55

66
[libraries]
77
testcontainers-ory-hydra = { module = "com.ardetrick.testcontainers:testcontainers-ory-hydra", version.ref = "testcontainersOryHydra" }

reference-app/src/test/java/com/ardetrick/oryhydrareference/OryHydraReferenceApplicationFunctionalTests.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,8 @@ private OAuth2Client createOAuthClient() throws ApiException {
156156
* @link <a href="https://www.ory.sh/docs/reference/api#tag/wellknown/operation/discoverJsonWebKeys"/>
157157
*/
158158
@Test
159-
// TODO: after upgrading past testcontainers-ory-hydra 0.0.5, resolve jwks_uri from the
160-
// discovery document (getOpenIdDiscoveryUri()) and drop this suppression.
161-
@SuppressWarnings("removal")
162159
void requestToJwksUriReturns200() throws IOException, InterruptedException {
163-
val request = HttpRequest.newBuilder(dockerComposeEnvironment.getPublicJwksUri())
160+
val request = HttpRequest.newBuilder(URI.create(dockerComposeEnvironment.publicBaseUriString() + "/.well-known/jwks.json"))
164161
.build();
165162
val response = HttpClient.newHttpClient()
166163
.send(
@@ -198,12 +195,9 @@ public void loginInvalidCredentials() {
198195
assertThat(page.content()).contains("invalid credentials try again");
199196
}
200197

201-
// TODO: after upgrading past testcontainers-ory-hydra 0.0.5, resolve authorization_endpoint
202-
// from the discovery document (getOpenIdDiscoveryUri()) and drop this suppression.
203-
@SuppressWarnings("removal")
204198
private URI getUriToInitiateFlow() {
205199
try {
206-
return new URIBuilder(dockerComposeEnvironment.getOAuth2AuthUri())
200+
return new URIBuilder(dockerComposeEnvironment.publicBaseUriString() + "/oauth2/auth")
207201
.addParameter("response_type", "code")
208202
.addParameter("client_id", oAuth2Client.getClientId())
209203
.addParameter("redirect_uri",

0 commit comments

Comments
 (0)