2016-02-03 10:20:22 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
|
|
* and other contributors as indicated by the @author tags.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2014-05-19 11:58:45 +00:00
|
|
|
package org.keycloak.email;
|
|
|
|
|
2014-08-27 10:41:40 +00:00
|
|
|
import org.keycloak.events.Event;
|
2014-05-19 11:58:45 +00:00
|
|
|
import org.keycloak.models.RealmModel;
|
|
|
|
import org.keycloak.models.UserModel;
|
|
|
|
import org.keycloak.provider.Provider;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
|
|
|
|
*/
|
2015-11-25 12:59:47 +00:00
|
|
|
public interface EmailTemplateProvider extends Provider {
|
2014-05-19 11:58:45 +00:00
|
|
|
|
2015-10-29 10:11:10 +00:00
|
|
|
String IDENTITY_PROVIDER_BROKER_CONTEXT = "identityProviderBrokerCtx";
|
|
|
|
|
2015-11-25 12:59:47 +00:00
|
|
|
public EmailTemplateProvider setRealm(RealmModel realm);
|
2014-05-19 11:58:45 +00:00
|
|
|
|
2015-11-25 12:59:47 +00:00
|
|
|
public EmailTemplateProvider setUser(UserModel user);
|
2014-05-19 11:58:45 +00:00
|
|
|
|
2015-11-25 12:59:47 +00:00
|
|
|
public EmailTemplateProvider setAttribute(String name, Object value);
|
2015-10-29 10:11:10 +00:00
|
|
|
|
2014-05-20 13:09:20 +00:00
|
|
|
public void sendEvent(Event event) throws EmailException;
|
|
|
|
|
2015-08-16 16:23:15 +00:00
|
|
|
/**
|
|
|
|
* Reset password sent from forgot password link on login
|
|
|
|
*
|
|
|
|
* @param link
|
|
|
|
* @param expirationInMinutes
|
|
|
|
* @throws EmailException
|
|
|
|
*/
|
2015-08-20 21:43:37 +00:00
|
|
|
public void sendPasswordReset(String link, long expirationInMinutes) throws EmailException;
|
2015-08-16 16:23:15 +00:00
|
|
|
|
2015-10-29 10:11:10 +00:00
|
|
|
/**
|
|
|
|
* Send to confirm that user wants to link his account with identity broker link
|
|
|
|
*/
|
|
|
|
void sendConfirmIdentityBrokerLink(String link, long expirationInMinutes) throws EmailException;
|
|
|
|
|
2015-08-16 16:23:15 +00:00
|
|
|
/**
|
|
|
|
* Change password email requested by admin
|
|
|
|
*
|
|
|
|
* @param link
|
|
|
|
* @param expirationInMinutes
|
|
|
|
* @throws EmailException
|
|
|
|
*/
|
2015-08-31 14:13:42 +00:00
|
|
|
public void sendExecuteActions(String link, long expirationInMinutes) throws EmailException;
|
2014-05-19 11:58:45 +00:00
|
|
|
|
|
|
|
public void sendVerifyEmail(String link, long expirationInMinutes) throws EmailException;
|
|
|
|
|
|
|
|
}
|