Skip to content

Commit

Permalink
improve error message for invalid issuer URL
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Helbig <kai.helbig@tngtech.com>
  • Loading branch information
ostrya committed Jun 13, 2023
1 parent 68743ab commit b5ddf55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -348,7 +348,7 @@ private String getRealm(@Nonnull final URI issuer) {
"The issuer '"
+ issuer
+ "' did not conform to the expected format"
+ " 'http[s]://$HOSTNAME[:port][:contextPath]/realms/$REALM'.");
+ " 'http[s]://$HOSTNAME[:$PORT][/$CONTEXT_PATH]/realms/$REALM'.");
}
return matcher.group(1);
}
Expand Down
Expand Up @@ -302,6 +302,6 @@ void unexpected_issuer_causes_exception() {
assertThatThrownBy(() -> builder.withSourceToken(TOKEN_WITH_UNEXPECTED_ISSUER_URL))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("did not conform to the expected format")
.hasMessageContaining("'http[s]://$HOSTNAME[:port][:contextPath]/realms/$REALM'");
.hasMessageContaining("'http[s]://$HOSTNAME[:$PORT][/$CONTEXT_PATH]/realms/$REALM'");
}
}

0 comments on commit b5ddf55

Please sign in to comment.