Package org.jivesoftware.openfire.user
Class AuthorizationBasedUserProviderMapper
java.lang.Object
org.jivesoftware.openfire.user.AuthorizationBasedUserProviderMapper
- All Implemented Interfaces:
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.DefaultUserProviderauthorizationBasedUserMapper.userProvider.className = org.jivesoftware.openfire.auth.NativeUserProvider
- Author:
- Guus der Kinderen, guus@goodbytes.nl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final UserProviderServes the administrative users.static final SystemProperty<Class>Name of the property of which the value is expected to be the classname of the UserProvider which will serve the administrative users.static final SystemProperty<Class>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.protected final UserProviderServes the regular, non-administrative users. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUserProvider(String username) Finds a suitable UserProvider for the user.Returns all providers that are used by this instance.
-
Field Details
-
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. -
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. -
adminProvider
Serves the administrative users. -
userProvider
Serves the regular, non-administrative users.
-
-
Constructor Details
-
AuthorizationBasedUserProviderMapper
public AuthorizationBasedUserProviderMapper()
-
-
Method Details
-
getUserProvider
Description copied from interface:UserProviderMapperFinds 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:
getUserProviderin interfaceUserProviderMapper- Parameters:
username- A user identifier (cannot be null or empty).- Returns:
- A UserProvider for the user (never null).
-
getUserProviders
Description copied from interface:UserProviderMapperReturns all providers that are used by this instance. The returned collection should have a consistent, predictable iteration order.- Specified by:
getUserProvidersin interfaceUserProviderMapper- Returns:
- all providers (never null).
-