in src/main/java/com/googlesource/gerrit/plugins/saml/SamlWebFilter.java [213:225]
private void redirectToIdentityProvider(J2EContext context) throws HttpAction {
String redirectUri =
Url.decode(
context
.getRequest()
.getRequestURI()
.substring(context.getRequest().getContextPath().length()));
@SuppressWarnings("unchecked")
SessionStore<J2EContext> store = context.getSessionStore();
store.set(context, SAML2StateGenerator.SAML_RELAY_STATE_ATTRIBUTE, redirectUri);
log.debug("Setting redirectUri: {}", redirectUri);
saml2Client.redirect(context);
}