Package org.jivesoftware.openfire.auth
Class AuthorizationBasedAuthProviderMapper
java.lang.Object
org.jivesoftware.openfire.auth.AuthorizationBasedAuthProviderMapper
- All Implemented Interfaces:
AuthProviderMapper
A
AuthProviderMapper 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 AuthProvider.
authorizationBasedAuthMapper.adminProvider.className = org.jivesoftware.openfire.auth.DefaultAuthProviderauthorizationBasedAuthMapper.userProvider.className = org.jivesoftware.openfire.auth.NativeAuthProvider
- Author:
- Guus der Kinderen, guus@goodbytes.nl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AuthProviderServes the administrative users.static final StringName of the property of which the value is expected to be the classname of the AuthProvider which will serve the administrative users.static final StringName of the property of which the value is expected to be the classname of the AuthProvider which will serve the regular, non-administrative users.protected final AuthProviderServes the regular, non-administrative users. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAuthProvider(String username) Finds a suitable AuthProvider for the user.Returns all providers that are used by this instance.protected static AuthProviderinstantiateProvider(String propertyName)
-
Field Details
-
PROPERTY_ADMINPROVIDER_CLASSNAME
Name of the property of which the value is expected to be the classname of the AuthProvider which will serve the administrative users.- See Also:
-
PROPERTY_USERPROVIDER_CLASSNAME
Name of the property of which the value is expected to be the classname of the AuthProvider which will serve the regular, non-administrative users.- See Also:
-
adminProvider
Serves the administrative users. -
userProvider
Serves the regular, non-administrative users.
-
-
Constructor Details
-
AuthorizationBasedAuthProviderMapper
public AuthorizationBasedAuthProviderMapper()
-
-
Method Details
-
instantiateProvider
-
getAuthProvider
Description copied from interface:AuthProviderMapperFinds a suitable AuthProvider for the user. Returns null when no AuthProvider can be found for the particular user.- Specified by:
getAuthProviderin interfaceAuthProviderMapper- Parameters:
username- A user identifier (cannot be null or empty).- Returns:
- An AuthProvider for the user (possibly null).
-
getAuthProviders
Description copied from interface:AuthProviderMapperReturns all providers that are used by this instance. The returned collection should have a consistent, predictable iteration order.- Specified by:
getAuthProvidersin interfaceAuthProviderMapper- Returns:
- all providers (never null).
-