public class AuthorizationBasedUserProviderMapper extends Object implements UserProviderMapper
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
.
Modifier and Type | Field and Description |
---|---|
protected UserProvider |
adminProvider
Serves the administrative users.
|
static 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.
|
static 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.
|
protected UserProvider |
userProvider
Serves the regular, non-administrative users.
|
Constructor and Description |
---|
AuthorizationBasedUserProviderMapper() |
Modifier and Type | Method and Description |
---|---|
UserProvider |
getUserProvider(String username)
Finds a suitable UserProvider for the user.
|
Set<UserProvider> |
getUserProviders()
Returns all providers that are used by this instance.
|
public static final String PROPERTY_ADMINPROVIDER_CLASSNAME
public static final String PROPERTY_USERPROVIDER_CLASSNAME
protected final UserProvider adminProvider
protected final UserProvider userProvider
public AuthorizationBasedUserProviderMapper()
public UserProvider getUserProvider(String username)
UserProviderMapper
getUserProvider
in interface UserProviderMapper
username
- A user identifier (cannot be null or empty).public Set<UserProvider> getUserProviders()
UserProviderMapper
getUserProviders
in interface UserProviderMapper
Copyright © 2003-2008 Jive Software.