use of edu.harvard.iq.dataverse.authorization.AuthenticationProviderDisplayInfo in project dataverse by IQSS.
the class LoginPage method listCredentialsAuthenticationProviders.
public List<AuthenticationProviderDisplayInfo> listCredentialsAuthenticationProviders() {
List<AuthenticationProviderDisplayInfo> infos = new LinkedList<>();
for (String id : authSvc.getAuthenticationProviderIdsOfType(CredentialsAuthenticationProvider.class)) {
AuthenticationProvider authenticationProvider = authSvc.getAuthenticationProvider(id);
infos.add(authenticationProvider.getInfo());
}
return infos;
}
use of edu.harvard.iq.dataverse.authorization.AuthenticationProviderDisplayInfo in project dataverse by IQSS.
the class EchoAuthenticationProviderFactory method buildProvider.
@Override
public AuthenticationProvider buildProvider(AuthenticationProviderRow aRow) throws AuthorizationSetupException {
String rawData = aRow.getFactoryData();
String[] data = { "", "" };
if (rawData != null) {
data = aRow.getFactoryData().split(",", -1);
}
try {
return new EchoAuthenticationProvider(aRow.getId(), data[0], data[1], new AuthenticationProviderDisplayInfo(aRow.getId(), aRow.getTitle(), aRow.getSubtitle()));
} catch (ArrayIndexOutOfBoundsException e) {
throw new AuthorizationSetupException("Can't create Echo prov. Raw data: '" + rawData + "'", e);
}
}
Aggregations