.command(SecurityCommands.SecurityChallenge)
.with(SecurityParts.CredentialsRequired, "Name,Password")
.with(MessageParts.ReplyTo, ErraiService.AUTHORIZATION_SVC_SUBJECT)
.with(SecurityParts.RejectedMessage, ServerBusUtils.encodeJSON(message.getParts()))
.copyResource("Session", message)
.errorsHandledBy(new ErrorCallback() {
public boolean error(Message message, Throwable throwable) {
ErrorHelper.sendClientError(bus, message, "Could not contact LoginClient to handle access denial, due to insufficient privileges for: " + message.getSubject(), throwable);
return false;
}
})