Reverting changes to freemarker login forms provider

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
Pedro Igor 2024-05-03 12:57:43 -03:00
parent 40a283b9e8
commit 6ae8c1e262

View file

@ -131,7 +131,6 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
protected RealmModel realm;
protected ClientModel client;
protected UriInfo uriInfo;
protected String tokenString;
protected FreeMarkerProvider freeMarker;
@ -147,7 +146,6 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
this.realm = session.getContext().getRealm();
this.client = session.getContext().getClient();
this.uriInfo = session.getContext().getUri();
this.tokenString = uriInfo.getQueryParameters().getFirst(Constants.ORG_TOKEN);
}
@SuppressWarnings("unchecked")
@ -289,9 +287,6 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
case LOGIN_RESET_OTP:
attributes.put("configuredOtpCredentials", new TotpLoginBean(session, realm, user, (String) this.attributes.get(OTPFormAuthenticator.SELECTED_OTP_CREDENTIAL_ID)));
break;
// case ORG_REGISTER:
// TODO can consume this attribute to display some information on the organization, but will require more processing than what's here now
// attributes.put("org", tokenString);
case REGISTER:
RegisterBean rb = new RegisterBean(formData, session);
//legacy bean for static template
@ -375,9 +370,6 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
uriBuilder.replaceQuery(null);
}
if (tokenString != null) {
uriBuilder.queryParam(Constants.ORG_TOKEN, tokenString);
}
if (client != null) {
uriBuilder.queryParam(Constants.CLIENT_ID, client.getClientId());
}