io.corbel.iam.service.UserService Maven / Gradle / Ivy
package io.corbel.iam.service;
import io.corbel.iam.exception.UserProfileConfigurationException;
import io.corbel.iam.model.Domain;
import io.corbel.iam.model.User;
import io.corbel.iam.model.UserToken;
import io.corbel.iam.repository.CreateUserException;
import io.corbel.lib.queries.request.Pagination;
import io.corbel.lib.queries.request.ResourceQuery;
import io.corbel.lib.queries.request.Sort;
import java.util.List;
import java.util.Optional;
import java.util.Set;
/**
* @author Rubén Carrasco
*
*/
public interface UserService {
String findUserDomain(String id);
User update(User user);
User create(String clientId, User user) throws CreateUserException;
User findById(String id);
List findUsersByDomain(String domain, ResourceQuery resourceQuery, Pagination pagination, Sort sort);
void signOut(String userId, Optional accessToken);
default void signOut(String userId) {
signOut(userId, Optional.empty());
}
void delete(User user);
boolean existsByUsernameAndDomain(String username, String domainId);
boolean existsByEmailAndDomain(String email, String domainId);
void invalidateAllTokens(String userId);
UserToken getSession(String token);
User getUserProfile(User user, Set userProfileFields) throws UserProfileConfigurationException;
void sendMailResetPassword(String email, String clientId, String domain);
void sendValidationEmail(User user, String clientId);
void confirmEmail(String domain, String email);
List findUserProfilesByDomain(Domain domain, ResourceQuery resourceQuery, Pagination pagination, Sort sort)
throws UserProfileConfigurationException;
User findByDomainAndUsername(String domain, String username);
User findByDomainAndEmail(String domain, String email);
void addScopes(String userId, String... scopes);
void removeScopes(String userId, String... scopes);
long countUsersByDomain(String domainId, ResourceQuery query);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy