in src/main/java/org/apache/sling/auth/core/impl/AuthenticationRequirementsManager.java [193:217]
public void serviceChanged(final ServiceEvent event) {
final Bundle bundle = event.getServiceReference().getBundle();
if (bundle != null && bundle.getBundleId() == this.bundleId) {
// ignore all services from this bundle
return;
}
// modification of service properties, unregistration of the
// service or service properties does not contain requirements
// property any longer (new event with type 8 added in OSGi Core 4.2)
final Long id = (Long) event.getServiceReference().getProperty(Constants.SERVICE_ID);
if ((event.getType() & (ServiceEvent.UNREGISTERING | ServiceEvent.MODIFIED_ENDMATCH)) != 0) {
queue(id, new Action(ActionType.REMOVED, event.getServiceReference()));
}
if ((event.getType() & ServiceEvent.MODIFIED) != 0) {
queue(id, new Action(ActionType.MODIFIED, event.getServiceReference()));
}
// add requirements for newly registered services and for
// updated services
if ((event.getType() & ServiceEvent.REGISTERED) != 0) {
queue(id, new Action(ActionType.ADDED, event.getServiceReference()));
}
schedule();
}