From ef53e6ee9f09181163488f0222f23bddb0702503 Mon Sep 17 00:00:00 2001 From: Vignesh Manickavasagam <69285843+gs-manvig@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:07:11 -0400 Subject: [PATCH] Update OAuth flow to accommodate new GitLab behaviour Newer versions (starting v14) have modified the OAuth authorization page formatting from `h3` to `h1`. --- .../sdlc/server/gitlab/auth/GitLabOAuthAuthenticator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legend-sdlc-server/src/main/java/org/finos/legend/sdlc/server/gitlab/auth/GitLabOAuthAuthenticator.java b/legend-sdlc-server/src/main/java/org/finos/legend/sdlc/server/gitlab/auth/GitLabOAuthAuthenticator.java index 46d78cc972..367abb52a6 100644 --- a/legend-sdlc-server/src/main/java/org/finos/legend/sdlc/server/gitlab/auth/GitLabOAuthAuthenticator.java +++ b/legend-sdlc-server/src/main/java/org/finos/legend/sdlc/server/gitlab/auth/GitLabOAuthAuthenticator.java @@ -207,7 +207,7 @@ private Optional getRedirectUrlFromResponse(CloseableHttpResponse respon { String responseString = EntityUtils.toString(response.getEntity()); Document doc = Jsoup.parse(responseString); - Element header = doc.getElementsByTag("h3").get(0); + Element header = doc.getElementsByClass("page-title").get(0); if ("Redirecting".equals(header.text())) { Element anchor = doc.getElementsByTag("a").get(0);