use of io.apiman.manager.api.beans.events.AccountSignupEvent in project apiman by apiman.
the class SsoEventService method newAccountCreated.
public void newAccountCreated(NewAccountCreatedDto newAccountCreatedDto) {
ApimanEventHeaders headers = ApimanEventHeaders.builder().setId(key(newAccountCreatedDto.getUserId(), newAccountCreatedDto.getTime())).setSource(URI.create("http://replaceme.local/foo")).setSubject("new.account").build();
AccountSignupEvent accountSignup = AccountSignupEvent.builder().setHeaders(headers).setUserId(newAccountCreatedDto.getUserId()).setUsername(newAccountCreatedDto.getUsername()).setEmailAddress(newAccountCreatedDto.getEmailAddress()).setFirstName(newAccountCreatedDto.getFirstName()).setSurname(newAccountCreatedDto.getSurname()).build();
LOGGER.debug("Received an account creation event (externally): {0} => translated into: {1}", newAccountCreatedDto, accountSignup);
eventService.fireEvent(accountSignup);
}
Aggregations