This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param changePasswordRequest | |
* @return | |
* @throws ChangePasswordException | |
*/ | |
public void changePassword(String accountId, String currentPassword, String newPassword, String confirmPassword) throws ChangePasswordException { | |
User userModel = null; | |
log.debug("change password accountID:{}", accountId); | |
// lookup the user by email address |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param username | |
* @param password | |
* @return | |
* @throws AuthenticationException | |
*/ | |
public AuthenticationToken authenticate(String username, String password) throws | |
AuthenticationException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param email | |
* @param firstName | |
* @param middleName | |
* @param lastName | |
* @param password | |
* @param confirmPassword | |
* @return | |
* @throws RegistrationException |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.auth.jwt; | |
import com.thinkmicroservices.ri.spring.auth.repository.model.User; | |
import java.io.Serializable; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.function.Function; | |
import org.springframework.beans.factory.annotation.Value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the event | |
AccountRegisteredEvent accountRegisteredEvent = new AccountRegisteredEvent(user.getAccountId(), email, firstName, middleName, lastName); | |
// set the message type and publish the AccountRegisteredEvent | |
this.accountEventSource.accountEvents() | |
.send(MessageBuilder.withPayload(accountRegisteredEvent) | |
.setHeader("type", "ACCOUNT_REGISTERED_EVENT").build()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.auth.messaging; | |
import org.springframework.cloud.stream.annotation.EnableBinding; | |
/** | |
* | |
* @author cwoodward | |
*/ | |
@EnableBinding(AccountEventSource.class) | |
public class AccountEventPublisher { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.auth.messaging; | |
import org.springframework.cloud.stream.annotation.Output; | |
import org.springframework.messaging.MessageChannel; | |
/** | |
* | |
* @author cwoodward | |
*/ | |
public interface AccountEventSource { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## docker-compose -f ./dc-06-outbound-sms.yml up -d | |
version: "3.7" | |
services: | |
############################################################## | |
# INFRASTRUCTURE SERVICES | |
################ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.notification.controller; | |
import com.thinkmicroservices.ri.spring.notification.model.EmailRequest; | |
import com.thinkmicroservices.ri.spring.notification.model.MmsRequest; | |
import com.thinkmicroservices.ri.spring.notification.model.SmsRequest; | |
import com.thinkmicroservices.ri.spring.notification.service.EmailQueueException; | |
import com.thinkmicroservices.ri.spring.notification.service.NotificationService; | |
import com.thinkmicroservices.ri.spring.notification.service.SmsQueueException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.notification.service; | |
import java.util.List; | |
/** | |
* | |
* @author cwoodward | |
*/ | |
public interface NotificationService { |