private UserDetails makeUser(InternalUser user) throws Exception {
Object salt = null;
Md5PasswordEncoder encoder = new Md5PasswordEncoder();
if(user.getAdmin() != null && user.getAdmin()) {
return new User(user.getEmail(), encoder.encodePassword(user.getPassword(), salt),
true, true, true, true, makeAdminGrantedAuthorities());
}
// TODO change it! By default it's a provider user
return new User(user.getEmail(), encoder.encodePassword(user.getPassword(), salt),
true, true, true, true, makeProviderGrantedAuthorities(user));
}