Package org.keycloak.email
Interface EmailTemplateProvider
-
- All Superinterfaces:
Provider
- All Known Implementing Classes:
FreeMarkerEmailTemplateProvider
public interface EmailTemplateProvider extends Provider
- Author:
- Stian Thorgersen
-
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTITY_PROVIDER_BROKER_CONTEXT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
send(String subjectFormatKey, String bodyTemplate, Map<String,Object> bodyAttributes)
Send formatted emailvoid
send(String subjectFormatKey, List<Object> subjectAttributes, String bodyTemplate, Map<String,Object> bodyAttributes)
Send formatted emailvoid
sendConfirmIdentityBrokerLink(String link, long expirationInMinutes)
Send to confirm that user wants to link his account with identity broker linkvoid
sendEmailUpdateConfirmation(String link, long expirationInMinutes, String address)
void
sendEvent(Event event)
void
sendExecuteActions(String link, long expirationInMinutes)
Change password email requested by adminvoid
sendPasswordReset(String link, long expirationInMinutes)
Reset password sent from forgot password link on loginvoid
sendSmtpTestEmail(Map<String,String> config, UserModel user)
Test SMTP connection with current logged in uservoid
sendVerifyEmail(String link, long expirationInMinutes)
EmailTemplateProvider
setAttribute(String name, Object value)
EmailTemplateProvider
setAuthenticationSession(AuthenticationSessionModel authenticationSession)
EmailTemplateProvider
setRealm(RealmModel realm)
EmailTemplateProvider
setUser(UserModel user)
-
-
-
Field Detail
-
IDENTITY_PROVIDER_BROKER_CONTEXT
static final String IDENTITY_PROVIDER_BROKER_CONTEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAuthenticationSession
EmailTemplateProvider setAuthenticationSession(AuthenticationSessionModel authenticationSession)
-
setRealm
EmailTemplateProvider setRealm(RealmModel realm)
-
setUser
EmailTemplateProvider setUser(UserModel user)
-
setAttribute
EmailTemplateProvider setAttribute(String name, Object value)
-
sendEvent
void sendEvent(Event event) throws EmailException
- Throws:
EmailException
-
sendPasswordReset
void sendPasswordReset(String link, long expirationInMinutes) throws EmailException
Reset password sent from forgot password link on login- Parameters:
link
-expirationInMinutes
-- Throws:
EmailException
-
sendSmtpTestEmail
void sendSmtpTestEmail(Map<String,String> config, UserModel user) throws EmailException
Test SMTP connection with current logged in user- Parameters:
config
- SMTP server configurationuser
- SMTP recipient- Throws:
EmailException
-
sendConfirmIdentityBrokerLink
void sendConfirmIdentityBrokerLink(String link, long expirationInMinutes) throws EmailException
Send to confirm that user wants to link his account with identity broker link- Throws:
EmailException
-
sendExecuteActions
void sendExecuteActions(String link, long expirationInMinutes) throws EmailException
Change password email requested by admin- Parameters:
link
-expirationInMinutes
-- Throws:
EmailException
-
sendVerifyEmail
void sendVerifyEmail(String link, long expirationInMinutes) throws EmailException
- Throws:
EmailException
-
sendEmailUpdateConfirmation
void sendEmailUpdateConfirmation(String link, long expirationInMinutes, String address) throws EmailException
- Throws:
EmailException
-
send
void send(String subjectFormatKey, String bodyTemplate, Map<String,Object> bodyAttributes) throws EmailException
Send formatted email- Parameters:
subjectFormatKey
- message property that will be used to format email subjectbodyTemplate
- freemarker template filebodyAttributes
- attributes used to fill template- Throws:
EmailException
-
send
void send(String subjectFormatKey, List<Object> subjectAttributes, String bodyTemplate, Map<String,Object> bodyAttributes) throws EmailException
Send formatted email- Parameters:
subjectFormatKey
- message property that will be used to format email subjectsubjectAttributes
- attributes used to fill subject format messagebodyTemplate
- freemarker template filebodyAttributes
- attributes used to fill template- Throws:
EmailException
-
-