in saml-authentication-server/src/main/java/jetbrains/buildServer/auth/saml/plugin/SamlLoginController.java [47:72]
protected ModelAndView doHandle(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse) throws Exception {
try {
LOG.info(String.format("Initiating SSO login at %s", httpServletRequest.getRequestURL()));
var settings = settingsStorage.load();
var endpoint = settings.getSsoEndpoint();
if (endpoint == null || "".equals(endpoint.trim())) {
throw new Exception("You must configure a valid SSO endpoint");
}
boolean ssoEndpointIsValid = validateUrl(endpoint);
if (!ssoEndpointIsValid) {
throw new Exception(String.format("SSO endpoint (%s) must be a valid URL ", endpoint));
}
LOG.info(String.format("Building AuthNRequest to %s", endpoint));
this.samlAuthenticationScheme.sendAuthnRequest(httpServletRequest, httpServletResponse);
return null;
} catch (Exception e) {
LOG.error(String.format("Error while initiating SSO login redirect: %s", e.getMessage()), e);
throw e;
}
}