Skip to content

Instantly share code, notes, and snippets.

@mbarkley
Last active August 29, 2015 14:01
Show Gist options
  • Save mbarkley/7ec2f86833dff6873449 to your computer and use it in GitHub Desktop.
Save mbarkley/7ec2f86833dff6873449 to your computer and use it in GitHub Desktop.
An example of securing an Errai Messaging @service with Errai Security
@Service
@RestrictedAccess
public class SecureService implements MessageCallback {
public void calback(Message message) {
// ...
}
}
public class Sender {
@Inject
MessageBus bus;
public void sendMessage() {
MessageBuilder
.createMessage("SecureService")
.defaultErrorHandling()
.sendNowWith(bus);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment