use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class InternalInitialDataService method informUserCreated.
@IsSendingAsyncMessage(MessageID.USER_CREATED)
private void informUserCreated(User user) {
DomainMessage infoRequest = new DomainMessage(MessageID.USER_CREATED);
UserMessage message = createInitialUserAuthData(user);
infoRequest.set(MessageDataKeys.USER_CREATION_DATA, message);
eventBusService.sendAsynchron(infoRequest);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class InternalInitialDataService method informUserAPITokenChanged.
@IsSendingAsyncMessage(MessageID.USER_API_TOKEN_CHANGED)
private void informUserAPITokenChanged(User user) {
DomainMessage infoRequest = new DomainMessage(MessageID.USER_API_TOKEN_CHANGED);
UserMessage message = createInitialUserAuthData(user);
message.setHashedApiToken(user.getHashedApiToken());
infoRequest.set(MessageDataKeys.USER_API_TOKEN_DATA, message);
eventBusService.sendAsynchron(infoRequest);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class UserCreationService method informUserAboutSignupAccepted.
@IsSendingAsyncMessage(MessageID.USER_NEW_API_TOKEN_REQUESTED)
private void informUserAboutSignupAccepted(User user) {
/* we just send info about new api token */
DomainMessage infoRequest = new DomainMessage(MessageID.USER_NEW_API_TOKEN_REQUESTED);
UserMessage userMessage = new UserMessage();
userMessage.setEmailAdress(user.getEmailAdress());
/*
* Security: we do NOT use userid inside this link - if some body got
* information about the link he/she is not able to use fetched api token
* because not knowing which userid...
*/
String linkWithOneTimeToken = environment.getServerBaseUrl() + AdministrationAPIConstants.API_FETCH_NEW_API_TOKEN_BY_ONE_WAY_TOKEN + "/" + user.getOneTimeToken();
userMessage.setLinkWithOneTimeToken(linkWithOneTimeToken);
userMessage.setSubject("SecHub user account created");
infoRequest.set(MessageDataKeys.USER_ONE_TIME_TOKEN_INFO, userMessage);
eventBusService.sendAsynchron(infoRequest);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class UserCreationService method informUserCreated.
@IsSendingAsyncMessage(MessageID.USER_CREATED)
private void informUserCreated(User user) {
DomainMessage infoRequest = new DomainMessage(MessageID.USER_CREATED);
UserMessage message = createInitialUserAuthData(user);
infoRequest.set(MessageDataKeys.USER_CREATION_DATA, message);
eventBusService.sendAsynchron(infoRequest);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class UserDeleteService method informUserDeleted.
@IsSendingAsyncMessage(MessageID.USER_DELETED)
private void informUserDeleted(UserMessage message) {
DomainMessage infoRequest = new DomainMessage(MessageID.USER_DELETED);
infoRequest.set(MessageDataKeys.USER_DELETE_DATA, message);
eventBusService.sendAsynchron(infoRequest);
}
Aggregations