Class AuthorizationBasedUserProviderMapper

java.lang.Object
org.jivesoftware.openfire.user.AuthorizationBasedUserProviderMapper
All Implemented Interfaces:
UserProviderMapper

public class AuthorizationBasedUserProviderMapper extends Object implements UserProviderMapper
A UserProviderMapper that can be used to draw administrative users from another source than the regular, non- administrative users. This implementation uses AdminManager to determine if a particular user is an administrative user. When a user is not recognized, it is deemed a regular, non-administrative user. To configure this provider, the both system properties from the example below must be defined. Their value must reference the classname of an UserProvider.
  • authorizationBasedUserMapper.adminProvider.className = org.jivesoftware.openfire.auth.DefaultUserProvider
  • authorizationBasedUserMapper.userProvider.className = org.jivesoftware.openfire.auth.NativeUserProvider
Author:
Guus der Kinderen, guus@goodbytes.nl
  • Field Details

    • PROPERTY_ADMINPROVIDER_CLASSNAME

      public static final String PROPERTY_ADMINPROVIDER_CLASSNAME
      Name of the property of which the value is expected to be the classname of the UserProvider which will serve the administrative users.
      See Also:
    • PROPERTY_USERPROVIDER_CLASSNAME

      public static final String PROPERTY_USERPROVIDER_CLASSNAME
      Name of the property of which the value is expected to be the classname of the UserProvider which will serve the regular, non-administrative users.
      See Also:
    • adminProvider

      protected final UserProvider adminProvider
      Serves the administrative users.
    • userProvider

      protected final UserProvider userProvider
      Serves the regular, non-administrative users.
  • Constructor Details

    • AuthorizationBasedUserProviderMapper

      public AuthorizationBasedUserProviderMapper()
  • Method Details

    • getUserProvider

      public UserProvider getUserProvider(String username)
      Description copied from interface: UserProviderMapper
      Finds a suitable UserProvider for the user. Note that the provided username need not reflect a pre-existing user (the instance might be used to determine in which provider a new user is to be created). Implementations are expected to be able to find a UserProvider for any username. If an implementation fails to do so, such a failure is assumed to be the result of a problem in implementation or configuration.
      Specified by:
      getUserProvider in interface UserProviderMapper
      Parameters:
      username - A user identifier (cannot be null or empty).
      Returns:
      A UserProvider for the user (never null).
    • getUserProviders

      public Set<UserProvider> getUserProviders()
      Description copied from interface: UserProviderMapper
      Returns all providers that are used by this instance. The returned collection should have a consistent, predictable iteration order.
      Specified by:
      getUserProviders in interface UserProviderMapper
      Returns:
      all providers (never null).