* Tests configuring a custom authorization manager that implements
* AuthorizationManager but does not extend
* LivelinkAuthorizationManager.
*/
public void testPlainAuthorizationManager() throws RepositoryException {
AuthorizationManager pluggable = new AuthorizationManager() {
@Override public Collection<AuthorizationResponse> authorizeDocids(
Collection<String> docids, AuthenticationIdentity identity) {
return Collections.<AuthorizationResponse>emptySet();
}
};
conn.setAuthorizationManager(pluggable);
Session sess = conn.login();
AuthorizationManager authZ = sess.getAuthorizationManager();
assertFalse(authZ.getClass().toString(),
authZ instanceof LivelinkAuthorizationManager);
assertSame(pluggable, authZ);
}