use of org.keycloak.email.freemarker.beans.ProfileBean in project keycloak by keycloak.
the class FreeMarkerEmailTemplateProvider method sendExecuteActions.
@Override
public void sendExecuteActions(String link, long expirationInMinutes) throws EmailException {
Map<String, Object> attributes = new HashMap<>(this.attributes);
attributes.put("user", new ProfileBean(user));
addLinkInfoIntoAttributes(link, expirationInMinutes, attributes);
attributes.put("realmName", getRealmName());
send("executeActionsSubject", "executeActions.ftl", attributes);
}
use of org.keycloak.email.freemarker.beans.ProfileBean in project keycloak by keycloak.
the class FreeMarkerEmailTemplateProvider method sendPasswordReset.
@Override
public void sendPasswordReset(String link, long expirationInMinutes) throws EmailException {
Map<String, Object> attributes = new HashMap<>(this.attributes);
attributes.put("user", new ProfileBean(user));
addLinkInfoIntoAttributes(link, expirationInMinutes, attributes);
attributes.put("realmName", getRealmName());
send("passwordResetSubject", "password-reset.ftl", attributes);
}
use of org.keycloak.email.freemarker.beans.ProfileBean in project keycloak by keycloak.
the class FreeMarkerEmailTemplateProvider method sendEvent.
@Override
public void sendEvent(Event event) throws EmailException {
Map<String, Object> attributes = new HashMap<>();
attributes.put("user", new ProfileBean(user));
attributes.put("event", new EventBean(event));
send(toCamelCase(event.getType()) + "Subject", "event-" + event.getType().toString().toLowerCase() + ".ftl", attributes);
}
use of org.keycloak.email.freemarker.beans.ProfileBean in project keycloak by keycloak.
the class FreeMarkerEmailTemplateProvider method sendSmtpTestEmail.
@Override
public void sendSmtpTestEmail(Map<String, String> config, UserModel user) throws EmailException {
setRealm(session.getContext().getRealm());
setUser(user);
Map<String, Object> attributes = new HashMap<>(this.attributes);
attributes.put("user", new ProfileBean(user));
attributes.put("realmName", realm.getName());
EmailTemplate email = processTemplate("emailTestSubject", Collections.emptyList(), "email-test.ftl", attributes);
send(config, email.getSubject(), email.getTextBody(), email.getHtmlBody());
}
use of org.keycloak.email.freemarker.beans.ProfileBean in project keycloak by keycloak.
the class FreeMarkerEmailTemplateProvider method sendVerifyEmail.
@Override
public void sendVerifyEmail(String link, long expirationInMinutes) throws EmailException {
Map<String, Object> attributes = new HashMap<>(this.attributes);
attributes.put("user", new ProfileBean(user));
addLinkInfoIntoAttributes(link, expirationInMinutes, attributes);
attributes.put("realmName", getRealmName());
send("emailVerificationSubject", "email-verification.ftl", attributes);
}
Aggregations