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.ContextInfo
buildContextInfo(User user, String clientId)
protected String
buildResetPasswordUri(String token)
Deprecated.protected String
buildResetPasswordUri(String token, String clientId)
protected String
getClientId(javax.servlet.http.HttpServletRequest req)
protected AuthorizedClientService<AuthorizedClient>
getClientService()
protected com.broadleafcommerce.common.messaging.authentication.AuthenticationMessageProducer
getMessageProducer()
protected String
getRedirectUrlParam()
protected Optional<javax.servlet.http.HttpServletRequest>
getRequest()
protected String
getResetPasswordUrl(@NonNull javax.servlet.http.HttpServletRequest request, String clientId)
protected String
getResetPasswordUrl(javax.servlet.http.HttpServletRequest request)
Deprecated.protected String
getResetPasswordView()
protected AuthorizationServerService<AuthorizationServer>
getServerService()
protected com.broadleafcommerce.common.extension.TypeFactory
getTypeFactory()
protected void
sendAuthenticationMessage(@NonNull AuthenticationEvent event)
Responsible for actually sending the event messagevoid
sendPasswordChangedEmail(@NonNull User user, @NonNull String clientId)
Dispatches a "PASSWORD_CHANGED"AuthenticationEvent
.void
sendResetPasswordEmail(@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:UserMessagingService
Dispatches a "RESET_PASSWORD"AuthenticationEvent
.- Specified by:
sendResetPasswordEmail
in 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:UserMessagingService
Dispatches a "PASSWORD_CHANGED"AuthenticationEvent
.- Specified by:
sendPasswordChangedEmail
in 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()
-
-