java.lang.Object
com.persequor.saga.modules.authmanager.service.UserService

@Singleton public class UserService extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public Optional<UserModel> get(UUID id, Class<? extends com.persequor.extension.ioc.registry.SpaceExtensionContext> space)
    • create

      public void create(UserModel user, Class<? extends com.persequor.extension.ioc.registry.SpaceExtensionContext> space)
    • getPaginated

      public UsersPage getPaginated(Class<? extends com.persequor.extension.ioc.registry.SpaceExtensionContext> space, FilterCollector filterCollector, int page, int perPage)
      Get a paginated list of users with the given filters. If the filter collector has memory filters, the query will be executed without pagination and the results will be filtered in memory (up to 1_000 users). If the amount of users is greater than 1_000, the total will be set to -1.
      Parameters:
      space - The space to get the users from.
      filterCollector - The filter collector to apply to the query.
      page - The page number to get, starting from 1.
      perPage - The number of users per page.
    • update

      public void update(UserModel user)
    • delete

      public void delete(UserModel user)
    • toggleActive

      public void toggleActive(UserModel user)
    • resetFailedLoginAttempts

      public void resetFailedLoginAttempts(UserModel user)
    • authenticate

      public Optional<UserModel> authenticate(@Nonnull String username, @Nonnull Class<? extends com.persequor.extension.ioc.registry.SpaceExtensionContext> space, Predicate<UserModel> authenticate) throws MaxLoginAttemptsExceededException
      Throws:
      MaxLoginAttemptsExceededException