use of org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProvider in project jackrabbit-oak by apache.
the class SyncMBeanImpl method getDelegatee.
@Nonnull
private Delegatee getDelegatee() {
SyncHandler handler = syncManager.getSyncHandler(syncName);
if (handler == null) {
log.error("No sync manager available for name {}.", syncName);
throw new IllegalArgumentException("No sync manager available for name " + syncName);
}
ExternalIdentityProvider idp = idpManager.getProvider(idpName);
if (idp == null) {
log.error("No idp available for name", idpName);
throw new IllegalArgumentException("No idp manager available for name " + idpName);
}
return Delegatee.createInstance(repository, securityProvider, handler, idp);
}
use of org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProvider in project jackrabbit-oak by apache.
the class SyncMBeanImplTest method before.
@Before
public void before() throws Exception {
super.before();
syncMgr = new SyncManager() {
@CheckForNull
@Override
public SyncHandler getSyncHandler(@Nonnull String name) {
if (SYNC_NAME.equals(name)) {
return new DefaultSyncHandler(syncConfig);
} else if (ThrowingSyncHandler.NAME.equals(name)) {
return new ThrowingSyncHandler(false);
} else if (ThrowingSyncHandler.NAME_ALLOWS_IDENTITY_LISTING.equals(name)) {
return new ThrowingSyncHandler(true);
} else {
return null;
}
}
};
idpMgr = new ExternalIdentityProviderManager() {
@CheckForNull
@Override
public ExternalIdentityProvider getProvider(@Nonnull String name) {
if (name.equals(idp.getName())) {
return idp;
} else {
return null;
}
}
};
syncMBean = createSyncMBeanImpl(SYNC_NAME, idp.getName());
}
Aggregations