Constraints to domain class.

Change-Id: I2f88906f288e06c1c1bbfc2a511cb23a15ac3273
Authentication.

Change-Id: I05cf1dd87d681dcdde3502356a1bd84898a37927