package com.dexels.oauth.api; /** * A User can have multiple applications. The username is globally unique and * primary key. * * If the username should be changeable by the user, one has to create a new * user and decide whether or not to keep the old user and optionally change * references to the old user to the new user. * * Furthermore, the User can also be not yet activated. That means that the user * should use the {@link ActivationToken}. If an User that has not yet been * activated tries to login or register, we invalidate the previous * {@link ActivationToken} and issue a new one. * */ public interface User { public String getUsername(); public String getHashedPassword(); public boolean isActivated(); public boolean hasApplication(String applicationId); }