private IServiceLocator getServiceLocator() {
return ServiceLocator.getInstance();
}
private UserToken createUserToken(final User user) {
UserToken userToken = null;
if(CheckArg.isNotNull(user)){
final long userId = user.getId();
final String username = user.getUsername();
final String password = user.getPassword();
final String sessionToken = StringUtilities.encodeToBase24String(username + ":" + password);
userToken = new UserToken(userId, sessionToken);
}
return userToken;
}