Interface IUserAuthenticationProvidersManager


public interface IUserAuthenticationProvidersManager
Manages user to authentication provider relations
Since:
3.21.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addUserToProvider(String userId, String providerId)
    Adds the user ID to the list of users who can login using the requested authentication provider
    boolean
    canLoginWithProvider(String userId, String providerId)
    Check if user can login using requested authentication provider
    Returns all allowed providers IDs for the requested user ID
    void
    Removes the user ID from the list of users who can log in for all authentication providers
    void
    removeUserFromProvider(String userId, String providerId)
    Removes the user ID from the list of users who can login using the requested authentication provider
    void
    Force the user to login using only the given set of authentications providers Updates all available authentication providers in the system and removes or adds the user
  • Method Details

    • canLoginWithProvider

      boolean canLoginWithProvider(@NotNull String userId, @NotNull String providerId)
      Check if user can login using requested authentication provider
      Parameters:
      userId - ID of the user
      providerId - ID of the authentication provider
      Returns:
      true if user can login
    • getAllowedProvidersForUser

      @NotNull Set<String> getAllowedProvidersForUser(@NotNull String userId)
      Returns all allowed providers IDs for the requested user ID
      Parameters:
      userId - ID of the user
      Returns:
      the set of accepted authentication providers IDs
    • addUserToProvider

      void addUserToProvider(@NotNull String userId, @NotNull String providerId)
      Adds the user ID to the list of users who can login using the requested authentication provider
      Parameters:
      userId - ID of the user to be added
      providerId - ID of the authentication provider
    • removeUserFromProvider

      void removeUserFromProvider(@NotNull String userId, @NotNull String providerId)
      Removes the user ID from the list of users who can login using the requested authentication provider
      Parameters:
      userId - ID of the user to be removed
      providerId - ID of the authentication provider
    • removeUser

      void removeUser(@NotNull String userId)
      Removes the user ID from the list of users who can log in for all authentication providers
      Parameters:
      userId - ID of the user to be removed
    • setAllowedProvidersForUser

      void setAllowedProvidersForUser(@NotNull String userId, @NotNull Set<String> providerIds)
      Force the user to login using only the given set of authentications providers Updates all available authentication providers in the system and removes or adds the user
      Parameters:
      userId - ID of the user
      providerIds - the set of authentication provider IDs