Class DefaultUserMessagingService
- java.lang.Object
-
- com.broadleafcommerce.auth.user.service.DefaultUserMessagingService
-
- All Implemented Interfaces:
UserMessagingService<User>
public class DefaultUserMessagingService extends Object implements UserMessagingService<User>
- Author:
- Nathan Moore (nathanmoore).
-
-
Constructor Summary
Constructors Constructor Description DefaultUserMessagingService(AuthorizedClientService<AuthorizedClient> clientService, AuthorizationServerService<AuthorizationServer> serverService, com.broadleafcommerce.common.messaging.authentication.AuthenticationMessageProducer messageProducer, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected com.broadleafcommerce.data.tracking.core.context.ContextInfobuildContextInfo(User user, String clientId)protected StringbuildResetPasswordUri(String token)Deprecated.protected StringbuildResetPasswordUri(String token, String clientId)protected StringgetClientId(javax.servlet.http.HttpServletRequest req)protected AuthorizedClientService<AuthorizedClient>getClientService()protected com.broadleafcommerce.common.messaging.authentication.AuthenticationMessageProducergetMessageProducer()protected StringgetRedirectUrlParam()protected Optional<javax.servlet.http.HttpServletRequest>getRequest()protected StringgetResetPasswordUrl(@NonNull javax.servlet.http.HttpServletRequest request, String clientId)protected StringgetResetPasswordUrl(javax.servlet.http.HttpServletRequest request)Deprecated.protected StringgetResetPasswordView()protected AuthorizationServerService<AuthorizationServer>getServerService()protected com.broadleafcommerce.common.extension.TypeFactorygetTypeFactory()protected voidsendAuthenticationMessage(@NonNull AuthenticationEvent event)Responsible for actually sending the event messagevoidsendPasswordChangedEmail(@NonNull User user, @NonNull String clientId)Dispatches a "PASSWORD_CHANGED"AuthenticationEvent.voidsendResetPasswordEmail(@NonNull User user, @NonNull String token, @NonNull String clientId)Dispatches a "RESET_PASSWORD"AuthenticationEvent.
-
-
-
Field Detail
-
TOKEN
public static final String TOKEN
- See Also:
- Constant Field Values
-
URL_REGEX
public static final String URL_REGEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultUserMessagingService
public DefaultUserMessagingService(AuthorizedClientService<AuthorizedClient> clientService, AuthorizationServerService<AuthorizationServer> serverService, com.broadleafcommerce.common.messaging.authentication.AuthenticationMessageProducer messageProducer, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Detail
-
sendResetPasswordEmail
public void sendResetPasswordEmail(@NonNull @NonNull User user, @NonNull @NonNull String token, @NonNull @NonNull String clientId)Description copied from interface:UserMessagingServiceDispatches a "RESET_PASSWORD"AuthenticationEvent.- Specified by:
sendResetPasswordEmailin interfaceUserMessagingService<User>- Parameters:
user- the user requesting a reset password.token- the secure token to facilitate the password reset.clientId- the client id associated with the request.
-
sendPasswordChangedEmail
public void sendPasswordChangedEmail(@NonNull @NonNull User user, @NonNull @NonNull String clientId)Description copied from interface:UserMessagingServiceDispatches a "PASSWORD_CHANGED"AuthenticationEvent.- Specified by:
sendPasswordChangedEmailin interfaceUserMessagingService<User>- Parameters:
user- the user requesting a reset password.clientId- the client id associated with the request.
-
sendAuthenticationMessage
protected void sendAuthenticationMessage(@NonNull @NonNull AuthenticationEvent event)Responsible for actually sending the event message- Parameters:
event- the event to be sent
-
buildContextInfo
protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo(User user, String clientId)
-
buildResetPasswordUri
@Deprecated protected String buildResetPasswordUri(String token)
Deprecated.
-
getResetPasswordUrl
protected String getResetPasswordUrl(@NonNull @NonNull javax.servlet.http.HttpServletRequest request, @Nullable String clientId)
-
getResetPasswordUrl
@Deprecated protected String getResetPasswordUrl(javax.servlet.http.HttpServletRequest request)
Deprecated.
-
getResetPasswordView
protected String getResetPasswordView()
-
getRedirectUrlParam
protected String getRedirectUrlParam()
-
getRequest
protected Optional<javax.servlet.http.HttpServletRequest> getRequest()
-
getClientId
protected String getClientId(javax.servlet.http.HttpServletRequest req)
-
getClientService
protected AuthorizedClientService<AuthorizedClient> getClientService()
-
getServerService
protected AuthorizationServerService<AuthorizationServer> getServerService()
-
getMessageProducer
protected com.broadleafcommerce.common.messaging.authentication.AuthenticationMessageProducer getMessageProducer()
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-
-