use of edu.harvard.iq.dataverse.authorization.providers.shib.ShibAuthenticationProviderFactory in project dataverse by IQSS.
the class AuthenticationServiceBean method startup.
@PostConstruct
public void startup() {
// First, set up the factories
try {
registerProviderFactory(new BuiltinAuthenticationProviderFactory(builtinUserServiceBean, passwordValidatorService));
registerProviderFactory(new ShibAuthenticationProviderFactory());
registerProviderFactory(new OAuth2AuthenticationProviderFactory());
} catch (AuthorizationSetupException ex) {
logger.log(Level.SEVERE, "Exception setting up the authentication provider factories: " + ex.getMessage(), ex);
}
// Now, load the providers.
em.createNamedQuery("AuthenticationProviderRow.findAllEnabled", AuthenticationProviderRow.class).getResultList().forEach((row) -> {
try {
registerProvider(loadProvider(row));
} catch (AuthenticationProviderFactoryNotFoundException e) {
logger.log(Level.SEVERE, "Cannot find authentication provider factory with alias '" + e.getFactoryAlias() + "'", e);
} catch (AuthorizationSetupException ex) {
logger.log(Level.SEVERE, "Exception setting up the authentication provider '" + row.getId() + "': " + ex.getMessage(), ex);
}
});
}
Aggregations